summaryrefslogtreecommitdiff
path: root/plugins/Sessions/Src/Utils.cpp
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/Utils.cpp
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/Utils.cpp')
-rw-r--r--plugins/Sessions/Src/Utils.cpp10
1 files changed, 5 insertions, 5 deletions
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);
}