diff options
author | George Hazan <george.hazan@gmail.com> | 2015-08-28 16:22:41 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-08-28 16:22:41 +0000 |
commit | c370af60855db957c5b200914bf0bde743845528 (patch) | |
tree | 0bd2ef127097c9e937c2650e8b202c3f09453323 /plugins/TrafficCounter | |
parent | 7f082bd5d4865c30b313661b7a02f048b4b137be (diff) |
mir_sntprintf / mir_snprintf: obsoleted second parameter removed wherever possible
git-svn-id: http://svn.miranda-ng.org/main/trunk@15064 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TrafficCounter')
-rw-r--r-- | plugins/TrafficCounter/src/TrafficCounter.cpp | 10 | ||||
-rw-r--r-- | plugins/TrafficCounter/src/misc.cpp | 16 | ||||
-rw-r--r-- | plugins/TrafficCounter/src/statistics.cpp | 2 |
3 files changed, 11 insertions, 17 deletions
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index 788bf0b63e..446358af3a 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -1075,10 +1075,7 @@ void NotifyOnSend(void) ppd.lchContact = NULL;
ppd.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
_tcsncpy(ppd.lptzContactName, TranslateT("Traffic counter notification"), MAX_CONTACTNAME);
- //
- mir_sntprintf(ppd.lptzText, _countof(ppd.lptzText), TranslateT("%d kilobytes sent"),
- notify_send_size = OverallInfo.CurrentSentTraffic >> 10);
- //
+ mir_sntprintf(ppd.lptzText, TranslateT("%d kilobytes sent"), notify_send_size = OverallInfo.CurrentSentTraffic >> 10);
ppd.colorBack = Traffic_PopupBkColor;
ppd.colorText = Traffic_PopupFontColor;
ppd.PluginWindowProc = NULL;
@@ -1094,10 +1091,7 @@ void NotifyOnRecv(void) ppd.lchContact = NULL;
ppd.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
_tcsncpy(ppd.lptzContactName, TranslateT("Traffic counter notification"), MAX_CONTACTNAME);
- //
- mir_sntprintf(ppd.lptzText, _countof(ppd.lptzText), TranslateT("%d kilobytes received"),
- notify_recv_size = OverallInfo.CurrentRecvTraffic >> 10);
- //
+ mir_sntprintf(ppd.lptzText, TranslateT("%d kilobytes received"), notify_recv_size = OverallInfo.CurrentRecvTraffic >> 10);
ppd.colorBack = Traffic_PopupBkColor;
ppd.colorText = Traffic_PopupFontColor;
ppd.PluginWindowProc = NULL;
diff --git a/plugins/TrafficCounter/src/misc.cpp b/plugins/TrafficCounter/src/misc.cpp index c4e43379dc..ef54ae6ed1 100644 --- a/plugins/TrafficCounter/src/misc.cpp +++ b/plugins/TrafficCounter/src/misc.cpp @@ -148,7 +148,7 @@ size_t GetFormattedTraffic(DWORD Value, BYTE Unit, TCHAR *Buffer, size_t Size) return 0;
}
- mir_sntprintf(Str1, _countof(Str1), _T("%d.%d"), Value / Divider, Value % Divider);
+ mir_sntprintf(Str1, _T("%d.%d"), Value / Divider, Value % Divider);
size_t l = GetNumberFormat(LOCALE_USER_DEFAULT, 0, Str1, &nf, NULL, 0);
if (!l) return 0;
l += mir_tstrlen(szUnit) + 1;
@@ -199,37 +199,37 @@ size_t GetDurationFormatM(DWORD Duration, TCHAR *Format, TCHAR *Buffer, size_t S // Что получили в аккумуляторе?
if (!mir_tstrcmp(Token, _T("d"))) {
q = Duration / (60 * 60 * 24);
- mir_sntprintf(Token, _countof(Token), _T("%d"), q);
+ mir_sntprintf(Token, _T("%d"), q);
Duration -= q * 60 * 60 * 24;
}
else if (!mir_tstrcmp(Token, _T("h"))) {
q = Duration / (60 * 60);
- mir_sntprintf(Token, _countof(Token), _T("%d"), q);
+ mir_sntprintf(Token, _T("%d"), q);
Duration -= q * 60 * 60;
}
else if (!mir_tstrcmp(Token, _T("hh"))) {
q = Duration / (60 * 60);
- mir_sntprintf(Token, _countof(Token), _T("%02d"), q);
+ mir_sntprintf(Token, _T("%02d"), q);
Duration -= q * 60 * 60;
}
else if (!mir_tstrcmp(Token, _T("m"))) {
q = Duration / 60;
- mir_sntprintf(Token, _countof(Token), _T("%d"), q);
+ mir_sntprintf(Token, _T("%d"), q);
Duration -= q * 60;
}
else if (!mir_tstrcmp(Token, _T("mm"))) {
q = Duration / 60;
- mir_sntprintf(Token, _countof(Token), _T("%02d"), q);
+ mir_sntprintf(Token, _T("%02d"), q);
Duration -= q * 60;
}
else if (!mir_tstrcmp(Token, _T("s"))) {
q = Duration;
- mir_sntprintf(Token, _countof(Token), _T("%d"), q);
+ mir_sntprintf(Token, _T("%d"), q);
Duration -= q;
}
else if (!mir_tstrcmp(Token, _T("ss"))) {
q = Duration;
- mir_sntprintf(Token, _countof(Token), _T("%02d"), q);
+ mir_sntprintf(Token, _T("%02d"), q);
Duration -= q;
}
diff --git a/plugins/TrafficCounter/src/statistics.cpp b/plugins/TrafficCounter/src/statistics.cpp index 4f40588061..6baaf37d9b 100644 --- a/plugins/TrafficCounter/src/statistics.cpp +++ b/plugins/TrafficCounter/src/statistics.cpp @@ -302,7 +302,7 @@ void Stat_ReadFile(BYTE n) pszPath = Utils_ReplaceVarsT(_T("%miranda_userdata%\\statistics"));
CreateDirectoryTreeT(pszPath);
- mir_sntprintf(FileName, _countof(FileName), _T("%s\\%S.stat"), pszPath, ProtoList[n].name);
+ mir_sntprintf(FileName, _T("%s\\%S.stat"), pszPath, ProtoList[n].name);
mir_free(pszPath);
GetLocalTime(&stNow);
ProtoList[n].hFile = CreateFile(FileName, GENERIC_READ | GENERIC_WRITE,
|