summaryrefslogtreecommitdiff
path: root/plugins/Sessions/Src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-04 22:12:13 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-04 22:12:13 +0000
commitb7c74cd5b22618d544a3f4ae124985d4837e3a22 (patch)
tree468d9610a590685322ad2159a9bd2d9e2ba83f89 /plugins/Sessions/Src
parent7de513f180c429859e246d1033d745b394e1fc28 (diff)
new mir_snprintf templates without SIZEOF
git-svn-id: http://svn.miranda-ng.org/main/trunk@14002 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Sessions/Src')
-rw-r--r--plugins/Sessions/Src/Main.cpp4
-rw-r--r--plugins/Sessions/Src/Utils.cpp10
2 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 54108687db..7842865d55 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -491,7 +491,7 @@ int SaveSessionDate()
mir_sntprintf(szSessionTime, lenn, _T("%s - %s"), szTimeBuf, szDateBuf);
char szSetting[256];
- mir_snprintf(szSetting, SIZEOF(szSetting), "%s_%d", "SessionDate", 0);
+ mir_snprintf(szSetting, "%s_%d", "SessionDate", 0);
TCHAR *ptszSaveSessionDate = db_get_tsa(NULL, MODNAME, szSetting);
db_set_ts(NULL, MODNAME, szSetting, szSessionTime);
@@ -516,7 +516,7 @@ int SaveUserSessionName(TCHAR *szUSessionName)
return 1;
char szSetting[256];
- mir_snprintf(szSetting, SIZEOF(szSetting), "%s_%u", "UserSessionDsc", 0);
+ mir_snprintf(szSetting, "%s_%u", "UserSessionDsc", 0);
TCHAR *ptszUserSessionName = db_get_tsa(NULL, MODNAME, szSetting);
if (ptszUserSessionName)
ResaveSettings("UserSessionDsc", 1, 255, ptszUserSessionName);
diff --git a/plugins/Sessions/Src/Utils.cpp b/plugins/Sessions/Src/Utils.cpp
index d0bb1134ea..9b15bfe40e 100644
--- a/plugins/Sessions/Src/Utils.cpp
+++ b/plugins/Sessions/Src/Utils.cpp
@@ -202,7 +202,7 @@ int GetInSessionOrder(MCONTACT hContact, int mode, int count)
void SetInSessionOrder(MCONTACT hContact, int mode, int count, unsigned int ordernum)
{
char szTemp[3];
- mir_snprintf(szTemp, SIZEOF(szTemp), "%02u", ordernum);
+ mir_snprintf(szTemp, "%02u", ordernum);
if (mode == 0) {
ptrA szValue(db_get_sa(hContact, MODNAME, "LastSessionsOrder"));
@@ -385,18 +385,18 @@ void SavePosition(HWND hwnd, char *wndName)
RECT rc;
GetWindowRect(hwnd, &rc);
char buffer[512];
- mir_snprintf(buffer, SIZEOF(buffer), "%sPosX", wndName);
+ mir_snprintf(buffer, "%sPosX", wndName);
db_set_dw(0, MODNAME, buffer, rc.left);
- mir_snprintf(buffer, SIZEOF(buffer), "%sPosY", wndName);
+ mir_snprintf(buffer, "%sPosY", wndName);
db_set_dw(0, MODNAME, buffer, rc.top);
}
void LoadPosition(HWND hWnd, char *wndName)
{
char buffer[512];
- mir_snprintf(buffer, SIZEOF(buffer), "%sPosX", wndName);
+ mir_snprintf(buffer, "%sPosX", wndName);
int x = db_get_dw(0, MODNAME, buffer, ((GetSystemMetrics(SM_CXSCREEN)) / 2) - 130);
- mir_snprintf(buffer, SIZEOF(buffer), "%sPosY", wndName);
+ mir_snprintf(buffer, "%sPosY", wndName);
int y = db_get_dw(0, MODNAME, buffer, ((GetSystemMetrics(SM_CYSCREEN)) / 2) - 80);
SetWindowPos(hWnd, NULL, x, y, 0, 0, SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOSIZE);
}