diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-17 23:04:21 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-19 19:24:16 +0300 |
commit | 2e125090810014fa46cd9bb27b2e4daea32ba2f4 (patch) | |
tree | 6b8d6ea72c0adeb7c9ba2a6e01490d6437fa94f6 /src/mir_app | |
parent | b04db4768abe18ae03e3f9b6f9d7be569d9f14a9 (diff) |
MIME types are of type char, not wchar_t
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/proto_utils.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mir_app/src/proto_utils.cpp b/src/mir_app/src/proto_utils.cpp index 9e575e3d00..12d6ac1202 100644 --- a/src/mir_app/src/proto_utils.cpp +++ b/src/mir_app/src/proto_utils.cpp @@ -371,29 +371,29 @@ MIR_APP_DLL(int) ProtoGetAvatarFileFormat(const wchar_t *ptszFileName) /////////////////////////////////////////////////////////////////////////////////////////
// mime type functions
-static wchar_t *wszMimeTypes[] =
-{
- L"application/octet-stream", // PA_FORMAT_UNKNOWN
- L"image/png", // PA_FORMAT_PNG
- L"image/jpeg", // PA_FORMAT_JPEG
- L"image/icon", // PA_FORMAT_ICON
- L"image/bmp", // PA_FORMAT_BMP
- L"image/gif", // PA_FORMAT_GIF
- L"image/swf", // PA_FORMAT_SWF
- L"application/xml" // PA_FORMAT_XML
+static char *wszMimeTypes[] =
+{
+ "application/octet-stream", // PA_FORMAT_UNKNOWN
+ "image/png", // PA_FORMAT_PNG
+ "image/jpeg", // PA_FORMAT_JPEG
+ "image/icon", // PA_FORMAT_ICON
+ "image/bmp", // PA_FORMAT_BMP
+ "image/gif", // PA_FORMAT_GIF
+ "image/swf", // PA_FORMAT_SWF
+ "application/xml" // PA_FORMAT_XML
};
-MIR_APP_DLL(const wchar_t*) ProtoGetAvatarMimeType(int iFileType)
+MIR_APP_DLL(const char*) ProtoGetAvatarMimeType(int iFileType)
{
if (iFileType >= 0 && iFileType < _countof(wszMimeTypes))
return wszMimeTypes[iFileType];
return nullptr;
}
-MIR_APP_DLL(int) ProtoGetAvatarFormatByMimeType(const wchar_t *pwszMimeType)
+MIR_APP_DLL(int) ProtoGetAvatarFormatByMimeType(const char *pwszMimeType)
{
for (int i = 0; i < _countof(wszMimeTypes); i++)
- if (!mir_wstrcmp(pwszMimeType, wszMimeTypes[i]))
+ if (!mir_strcmp(pwszMimeType, wszMimeTypes[i]))
return i;
return PA_FORMAT_UNKNOWN;
|