diff options
Diffstat (limited to 'plugins/AVS/src')
-rw-r--r-- | plugins/AVS/src/cache.cpp | 2 | ||||
-rw-r--r-- | plugins/AVS/src/main.cpp | 6 | ||||
-rw-r--r-- | plugins/AVS/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/AVS/src/services.cpp | 14 | ||||
-rw-r--r-- | plugins/AVS/src/utils.cpp | 2 |
5 files changed, 13 insertions, 13 deletions
diff --git a/plugins/AVS/src/cache.cpp b/plugins/AVS/src/cache.cpp index f723c05f81..76526891be 100644 --- a/plugins/AVS/src/cache.cpp +++ b/plugins/AVS/src/cache.cpp @@ -149,7 +149,7 @@ void NotifyMetaAware(MCONTACT hContact, CacheNode *node, AVATARCACHEENTRY *ace) // Default value
if (cacn.hash[0] == '\0')
- mir_sntprintf(cacn.hash, _countof(cacn.hash), _T("AVS-HASH-%x"), GetFileHash(cacn.filename));
+ mir_sntprintf(cacn.hash, _T("AVS-HASH-%x"), GetFileHash(cacn.filename));
NotifyEventHooks(hEventContactAvatarChanged, (WPARAM)cacn.hContact, (LPARAM)&cacn);
}
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index 6ed85901fd..e48e8dc82d 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -142,10 +142,10 @@ static void LoadProtoInfo(PROTOCOLDESCRIPTOR *proto) return;
char protoName[MAX_PATH];
- mir_snprintf(protoName, _countof(protoName), "Global avatar for %s accounts", proto->szName);
+ mir_snprintf(protoName, "Global avatar for %s accounts", proto->szName);
TCHAR protoNameTmp[MAX_PATH];
- mir_sntprintf(protoNameTmp, _countof(protoNameTmp), TranslateT("Global avatar for %s accounts"), _A2T(proto->szName));
+ mir_sntprintf(protoNameTmp, TranslateT("Global avatar for %s accounts"), _A2T(proto->szName));
protoPicCacheEntry *pce = new protoPicCacheEntry;
if (CreateAvatarInCache(0, pce, protoName) != 1)
db_unset(0, PPICT_MODULE, protoName);
@@ -323,7 +323,7 @@ void InternalDrawAvatar(AVATARDRAWREQUEST *r, HBITMAP hbm, LONG bmWidth, LONG bm static int ModulesLoaded(WPARAM, LPARAM)
{
TCHAR szEventName[100];
- mir_sntprintf(szEventName, _countof(szEventName), _T("avs_loaderthread_%d"), GetCurrentThreadId());
+ mir_sntprintf(szEventName, _T("avs_loaderthread_%d"), GetCurrentThreadId());
hLoaderEvent = CreateEvent(NULL, TRUE, FALSE, szEventName);
SetThreadPriority(mir_forkthread(PicLoader, 0), THREAD_PRIORITY_IDLE);
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index 3294089c99..5909a0d1ea 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -388,7 +388,7 @@ static INT_PTR CALLBACK DlgProcOptionsProtos(HWND hwndDlg, UINT msg, WPARAM wPar if (!db_get_ts(NULL, PPICT_MODULE, g_selectedProto, &dbv)) { if (!PathIsAbsoluteT(VARST(dbv.ptszVal))) { TCHAR szFinalPath[MAX_PATH]; - mir_sntprintf(szFinalPath, _countof(szFinalPath), _T("%%miranda_path%%\\%s"), dbv.ptszVal); + mir_sntprintf(szFinalPath, _T("%%miranda_path%%\\%s"), dbv.ptszVal); SetDlgItemText(hwndDlg, IDC_PROTOAVATARNAME, szFinalPath); } else SetDlgItemText(hwndDlg, IDC_PROTOAVATARNAME, dbv.ptszVal); diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp index 33084606e9..da081abf46 100644 --- a/plugins/AVS/src/services.cpp +++ b/plugins/AVS/src/services.cpp @@ -347,7 +347,7 @@ void SaveImage(SaveProtocolData &d, char *protocol, int format) if (!Proto_IsAvatarFormatSupported(protocol, format))
return;
- mir_sntprintf(d.image_file_name, _countof(d.image_file_name), _T("%s%s"), d.temp_file, ProtoGetAvatarExtension(format));
+ mir_sntprintf(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;
@@ -550,13 +550,13 @@ static int InternalSetMyAvatar(char *protocol, TCHAR *szFinalName, SetMyAvatarHo TCHAR globalFile[1024];
BOOL saved = TRUE;
if (FoldersGetCustomPathT(hGlobalAvatarFolder, globalFile, _countof(globalFile), _T(""))) {
- mir_sntprintf(globalFile, _countof(globalFile), _T("%s%s"), g_szDataPath, _T("GlobalAvatar"));
+ mir_sntprintf(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, _countof(globalFile), _T("%s\\my_global_avatar%s"), globalFile, ext);
+ mir_sntprintf(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, _countof(globalFile), _T("%s\\my_global_avatar%s"), globalFile, ext);
+ mir_sntprintf(globalFile, _T("%s\\my_global_avatar%s"), globalFile, ext);
CopyFile(szFinalName, globalFile, FALSE);
}
else {
// Save as PNG
- mir_sntprintf(globalFile, _countof(globalFile), _T("%s\\my_global_avatar.png"), globalFile);
+ mir_sntprintf(globalFile, _T("%s\\my_global_avatar.png"), globalFile);
if (BmpFilterSaveBitmap(hBmpTmp, globalFile, 0))
saved = FALSE;
@@ -685,10 +685,10 @@ INT_PTR avSetMyAvatar(char* protocol, TCHAR* tszPath) TCHAR title[256];
if (protocol == NULL)
- mir_sntprintf(title, _countof(title), TranslateT("Set My Avatar"));
+ mir_sntprintf(title, TranslateT("Set My Avatar"));
else {
TCHAR* prototmp = mir_a2t(protocol);
- mir_sntprintf(title, _countof(title), TranslateT("Set My Avatar for %s"), prototmp);
+ mir_sntprintf(title, TranslateT("Set My Avatar for %s"), prototmp);
mir_free(prototmp);
}
ofn.lpstrTitle = title;
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp index 6b2ffdeb4b..5167b3714e 100644 --- a/plugins/AVS/src/utils.cpp +++ b/plugins/AVS/src/utils.cpp @@ -103,7 +103,7 @@ int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto) if (pdescr == NULL)
return -1;
char key[MAX_PATH];
- mir_snprintf(key, _countof(key), "Global avatar for %s accounts", pdescr->szProtoName);
+ mir_snprintf(key, "Global avatar for %s accounts", pdescr->szProtoName);
if (tszValue = db_get_tsa(NULL, PPICT_MODULE, key))
MyPathToAbsolute(tszValue, tszFilename);
}
|