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 /src/core/stdchat | |
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 'src/core/stdchat')
-rw-r--r-- | src/core/stdchat/src/main.cpp | 2 | ||||
-rw-r--r-- | src/core/stdchat/src/tools.cpp | 2 | ||||
-rw-r--r-- | src/core/stdchat/src/window.cpp | 16 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/core/stdchat/src/main.cpp b/src/core/stdchat/src/main.cpp index a65c523c7b..943ddd594b 100644 --- a/src/core/stdchat/src/main.cpp +++ b/src/core/stdchat/src/main.cpp @@ -471,7 +471,7 @@ STDMETHODIMP CREOleCallback::GetNewStorage(LPSTORAGE * lplpstg) {
WCHAR szwName[64];
char szName[64];
- mir_snprintf(szName, _countof(szName), "s%u", nextStgId++);
+ mir_snprintf(szName, "s%u", nextStgId++);
MultiByteToWideChar(CP_ACP, 0, szName, -1, szwName, _countof(szwName));
if (pictStg == NULL)
return STG_E_MEDIUMFULL;
diff --git a/src/core/stdchat/src/tools.cpp b/src/core/stdchat/src/tools.cpp index 4f721cd819..b8bab73b79 100644 --- a/src/core/stdchat/src/tools.cpp +++ b/src/core/stdchat/src/tools.cpp @@ -135,7 +135,7 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO if (pszWordText && pszWordText[0]) {
TCHAR szMenuText[4096];
- mir_sntprintf(szMenuText, _countof(szMenuText), TranslateT("Look up '%s':"), pszWordText);
+ mir_sntprintf(szMenuText, TranslateT("Look up '%s':"), pszWordText);
ModifyMenu(*hMenu, 4, MF_STRING | MF_BYPOSITION, 4, szMenuText);
}
else ModifyMenu(*hMenu, 4, MF_STRING | MF_GRAYED | MF_BYPOSITION, 4, TranslateT("No word to look up"));
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp index 2ad1e6c126..1fae21565d 100644 --- a/src/core/stdchat/src/window.cpp +++ b/src/core/stdchat/src/window.cpp @@ -996,7 +996,7 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, SESSION_INFO *si }
if (tszBuf[0] == 0)
- mir_sntprintf(tszBuf, _countof(tszBuf), _T("%s: %s\r\n%s: %s\r\n%s: %s"),
+ mir_sntprintf(tszBuf, _T("%s: %s\r\n%s: %s\r\n%s: %s"),
TranslateT("Nickname"), ui->pszNick,
TranslateT("Unique ID"), ui->pszUID,
TranslateT("Status"), pci->TM_WordToString(si->pStatuses, ui->Status));
@@ -1149,13 +1149,13 @@ static int RestoreWindowPosition(HWND hwnd, MCONTACT hContact, char * szModule, GetWindowPlacement(hwnd, &wp);
char szSettingName[64];
- mir_snprintf(szSettingName, _countof(szSettingName), "%sx", szNamePrefix);
+ mir_snprintf(szSettingName, "%sx", szNamePrefix);
int x = db_get_dw(hContact, szModule, szSettingName, -1);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sy", szNamePrefix);
+ mir_snprintf(szSettingName, "%sy", szNamePrefix);
int y = (int)db_get_dw(hContact, szModule, szSettingName, -1);
- mir_snprintf(szSettingName, _countof(szSettingName), "%swidth", szNamePrefix);
+ mir_snprintf(szSettingName, "%swidth", szNamePrefix);
int width = db_get_dw(hContact, szModule, szSettingName, -1);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sheight", szNamePrefix);
+ mir_snprintf(szSettingName, "%sheight", szNamePrefix);
int height = db_get_dw(hContact, szModule, szSettingName, -1);
if (x == -1)
@@ -2332,7 +2332,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar USERINFO *ui = pci->SM_GetUserFromIndex(parentdat->ptszID, parentdat->pszModule, item);
if (ui != NULL) {
static TCHAR ptszBuf[1024];
- mir_sntprintf(ptszBuf, _countof(ptszBuf), _T("%s: %s\r\n%s: %s\r\n%s: %s"),
+ mir_sntprintf(ptszBuf, _T("%s: %s\r\n%s: %s\r\n%s: %s"),
TranslateT("Nickname"), ui->pszNick,
TranslateT("Unique ID"), ui->pszUID,
TranslateT("Status"), pci->TM_WordToString(parentdat->pStatuses, ui->Status));
@@ -2451,11 +2451,11 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar _tcsncpy_s(szName, (pInfo->ptszModDispName ? pInfo->ptszModDispName : _A2T(si->pszModule)), _TRUNCATE);
ValidateFilename(szName);
- mir_sntprintf(szFolder, _countof(szFolder), _T("%s\\%s"), g_Settings.pszLogDir, szName);
+ mir_sntprintf(szFolder, _T("%s\\%s"), g_Settings.pszLogDir, szName);
mir_sntprintf(szName, _T("%s.log"), si->ptszID);
ValidateFilename(szName);
- mir_sntprintf(szFile, _countof(szFile), _T("%s\\%s"), szFolder, szName);
+ mir_sntprintf(szFile, _T("%s\\%s"), szFolder, szName);
ShellExecute(hwndDlg, _T("open"), szFile, NULL, NULL, SW_SHOW);
}
}
|