From b7c74cd5b22618d544a3f4ae124985d4837e3a22 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 4 Jun 2015 22:12:13 +0000 Subject: new mir_snprintf templates without SIZEOF git-svn-id: http://svn.miranda-ng.org/main/trunk@14002 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdchat/src/options.cpp | 2 +- src/core/stdchat/src/tools.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/core/stdchat') diff --git a/src/core/stdchat/src/options.cpp b/src/core/stdchat/src/options.cpp index 8a5536ec24..84b1fc6fb4 100644 --- a/src/core/stdchat/src/options.cpp +++ b/src/core/stdchat/src/options.cpp @@ -309,7 +309,7 @@ void AddIcons(void) HICON LoadIconEx(char* pszIcoLibName, BOOL big) { char szTemp[256]; - mir_snprintf(szTemp, SIZEOF(szTemp), "chat_%s", pszIcoLibName); + mir_snprintf(szTemp, "chat_%s", pszIcoLibName); return Skin_GetIcon(szTemp, big); } diff --git a/src/core/stdchat/src/tools.cpp b/src/core/stdchat/src/tools.cpp index b886edf0d5..284499ef98 100644 --- a/src/core/stdchat/src/tools.cpp +++ b/src/core/stdchat/src/tools.cpp @@ -28,16 +28,16 @@ bool LoadMessageFont(LOGFONT *lf, COLORREF *colour) int i = 8; // MSGFONTID_MESSAGEAREA if (colour) { - mir_snprintf(str, SIZEOF(str), "SRMFont%dCol", i); + mir_snprintf(str, "SRMFont%dCol", i); *colour = db_get_dw(NULL, "SRMM", str, 0); } if (lf) { - mir_snprintf(str, SIZEOF(str), "SRMFont%dSize", i); + mir_snprintf(str, "SRMFont%dSize", i); lf->lfHeight = (char)db_get_b(NULL, "SRMM", str, -12); lf->lfWidth = 0; lf->lfEscapement = 0; lf->lfOrientation = 0; - mir_snprintf(str, SIZEOF(str), "SRMFont%dSty", i); + mir_snprintf(str, "SRMFont%dSty", i); int style = db_get_b(NULL, "SRMM", str, 0); lf->lfWeight = style & DBFONTF_BOLD ? FW_BOLD : FW_NORMAL; lf->lfItalic = style & DBFONTF_ITALIC ? 1 : 0; @@ -47,7 +47,7 @@ bool LoadMessageFont(LOGFONT *lf, COLORREF *colour) lf->lfClipPrecision = CLIP_DEFAULT_PRECIS; lf->lfQuality = DEFAULT_QUALITY; lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE; - mir_snprintf(str, SIZEOF(str), "SRMFont%d", i); + mir_snprintf(str, "SRMFont%d", i); DBVARIANT dbv; if (db_get_ts(NULL, "SRMM", str, &dbv)) @@ -56,7 +56,7 @@ bool LoadMessageFont(LOGFONT *lf, COLORREF *colour) mir_tstrncpy(lf->lfFaceName, dbv.ptszVal, SIZEOF(lf->lfFaceName)); db_free(&dbv); } - mir_snprintf(str, SIZEOF(str), "SRMFont%dSet", i); + mir_snprintf(str, "SRMFont%dSet", i); lf->lfCharSet = db_get_b(NULL, "SRMM", str, DEFAULT_CHARSET); } return true; -- cgit v1.2.3