summaryrefslogtreecommitdiff
path: root/plugins/AVS/src/services.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/AVS/src/services.cpp')
-rw-r--r--plugins/AVS/src/services.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp
index 5162f283f6..33084606e9 100644
--- a/plugins/AVS/src/services.cpp
+++ b/plugins/AVS/src/services.cpp
@@ -128,7 +128,7 @@ static INT_PTR avSetAvatar(MCONTACT hContact, TCHAR *tszPath)
if (tszPath == NULL) {
TCHAR filter[256];
- Bitmap_GetFilter(filter, SIZEOF(filter));
+ Bitmap_GetFilter(filter, _countof(filter));
OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
@@ -347,7 +347,7 @@ void SaveImage(SaveProtocolData &d, char *protocol, int format)
if (!Proto_IsAvatarFormatSupported(protocol, format))
return;
- mir_sntprintf(d.image_file_name, SIZEOF(d.image_file_name), _T("%s%s"), d.temp_file, ProtoGetAvatarExtension(format));
+ mir_sntprintf(d.image_file_name, _countof(d.image_file_name), _T("%s%s"), d.temp_file, ProtoGetAvatarExtension(format));
if (BmpFilterSaveBitmap(d.hBmpProto, d.image_file_name, format == PA_FORMAT_JPEG ? JPEG_QUALITYSUPERB : 0))
return;
@@ -549,14 +549,14 @@ static int InternalSetMyAvatar(char *protocol, TCHAR *szFinalName, SetMyAvatarHo
// Copy avatar file to store as global one
TCHAR globalFile[1024];
BOOL saved = TRUE;
- if (FoldersGetCustomPathT(hGlobalAvatarFolder, globalFile, SIZEOF(globalFile), _T(""))) {
- mir_sntprintf(globalFile, SIZEOF(globalFile), _T("%s%s"), g_szDataPath, _T("GlobalAvatar"));
+ if (FoldersGetCustomPathT(hGlobalAvatarFolder, globalFile, _countof(globalFile), _T(""))) {
+ mir_sntprintf(globalFile, _countof(globalFile), _T("%s%s"), g_szDataPath, _T("GlobalAvatar"));
CreateDirectory(globalFile, NULL);
}
TCHAR *ext = _tcsrchr(szFinalName, _T('.')); // Can't be NULL here
if (format == PA_FORMAT_XML || format == PA_FORMAT_SWF) {
- mir_sntprintf(globalFile, SIZEOF(globalFile), _T("%s\\my_global_avatar%s"), globalFile, ext);
+ mir_sntprintf(globalFile, _countof(globalFile), _T("%s\\my_global_avatar%s"), globalFile, ext);
CopyFile(szFinalName, globalFile, FALSE);
}
else {
@@ -574,12 +574,12 @@ static int InternalSetMyAvatar(char *protocol, TCHAR *szFinalName, SetMyAvatarHo
// Check if need to resize
if (hBmpTmp == hBmp || hBmpTmp == NULL) {
// Use original image
- mir_sntprintf(globalFile, SIZEOF(globalFile), _T("%s\\my_global_avatar%s"), globalFile, ext);
+ mir_sntprintf(globalFile, _countof(globalFile), _T("%s\\my_global_avatar%s"), globalFile, ext);
CopyFile(szFinalName, globalFile, FALSE);
}
else {
// Save as PNG
- mir_sntprintf(globalFile, SIZEOF(globalFile), _T("%s\\my_global_avatar.png"), globalFile);
+ mir_sntprintf(globalFile, _countof(globalFile), _T("%s\\my_global_avatar.png"), globalFile);
if (BmpFilterSaveBitmap(hBmpTmp, globalFile, 0))
saved = FALSE;
@@ -665,7 +665,7 @@ INT_PTR avSetMyAvatar(char* protocol, TCHAR* tszPath)
FilterGetStrings(filter, allAcceptXML, allAcceptSWF);
TCHAR inipath[1024];
- FoldersGetCustomPathT(hMyAvatarsFolder, inipath, SIZEOF(inipath), _T("."));
+ FoldersGetCustomPathT(hMyAvatarsFolder, inipath, _countof(inipath), _T("."));
OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
@@ -685,10 +685,10 @@ INT_PTR avSetMyAvatar(char* protocol, TCHAR* tszPath)
TCHAR title[256];
if (protocol == NULL)
- mir_sntprintf(title, SIZEOF(title), TranslateT("Set My Avatar"));
+ mir_sntprintf(title, _countof(title), TranslateT("Set My Avatar"));
else {
TCHAR* prototmp = mir_a2t(protocol);
- mir_sntprintf(title, SIZEOF(title), TranslateT("Set My Avatar for %s"), prototmp);
+ mir_sntprintf(title, _countof(title), TranslateT("Set My Avatar for %s"), prototmp);
mir_free(prototmp);
}
ofn.lpstrTitle = title;