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/Sessions | |
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/Sessions')
-rw-r--r-- | plugins/Sessions/Src/Main.cpp | 16 | ||||
-rw-r--r-- | plugins/Sessions/Src/Utils.cpp | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index d0a9924980..9aa921b2de 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -602,17 +602,17 @@ int DelUserDefSession(int ses_count) }
char szSessionName[256];
- mir_snprintf(szSessionName, _countof(szSessionName), "%s_%u", "UserSessionDsc", ses_count);
+ mir_snprintf(szSessionName, "%s_%u", "UserSessionDsc", ses_count);
db_unset(NULL, MODNAME, szSessionName);
- mir_snprintf(szSessionName, _countof(szSessionName), "%s_%u", "FavUserSession", ses_count);
+ mir_snprintf(szSessionName, "%s_%u", "FavUserSession", ses_count);
db_unset(NULL, MODNAME, szSessionName);
for (int i = ses_count + 1;; i++) {
- mir_snprintf(szSessionName, _countof(szSessionName), "%s_%u", "UserSessionDsc", i);
+ mir_snprintf(szSessionName, "%s_%u", "UserSessionDsc", i);
ptrT szSessionNameBuf(db_get_tsa(NULL, MODNAME, szSessionName));
- mir_snprintf(szSessionName, _countof(szSessionName), "%s_%u", "UserSessionDsc", i - 1);
+ mir_snprintf(szSessionName, "%s_%u", "UserSessionDsc", i - 1);
if (szSessionNameBuf) {
MarkUserDefSession(i - 1, IsMarkedUserDefSession(i));
db_set_ts(NULL, MODNAME, szSessionName, szSessionNameBuf);
@@ -620,7 +620,7 @@ int DelUserDefSession(int ses_count) else {
db_unset(NULL, MODNAME, szSessionName);
- mir_snprintf(szSessionName, _countof(szSessionName), "%s_%u", "FavUserSession", i - 1);
+ mir_snprintf(szSessionName, "%s_%u", "FavUserSession", i - 1);
db_unset(NULL, MODNAME, szSessionName);
break;
}
@@ -638,14 +638,14 @@ int DeleteAutoSession(int ses_count) }
char szSessionName[256];
- mir_snprintf(szSessionName, _countof(szSessionName), "%s_%u", "SessionDate", ses_count);
+ mir_snprintf(szSessionName, "%s_%u", "SessionDate", ses_count);
db_unset(NULL, MODNAME, szSessionName);
for (int i = ses_count + 1;; i++) {
- mir_snprintf(szSessionName, _countof(szSessionName), "%s_%u", "SessionDate", i);
+ mir_snprintf(szSessionName, "%s_%u", "SessionDate", i);
ptrT szSessionNameBuf(db_get_tsa(NULL, MODNAME, szSessionName));
- mir_snprintf(szSessionName, _countof(szSessionName), "%s_%u", "SessionDate", i - 1);
+ mir_snprintf(szSessionName, "%s_%u", "SessionDate", i - 1);
if (szSessionNameBuf)
db_set_ts(NULL, MODNAME, szSessionName, szSessionNameBuf);
else {
diff --git a/plugins/Sessions/Src/Utils.cpp b/plugins/Sessions/Src/Utils.cpp index 8bc54180a4..1672a81dda 100644 --- a/plugins/Sessions/Src/Utils.cpp +++ b/plugins/Sessions/Src/Utils.cpp @@ -127,7 +127,7 @@ bool LoadContactsFromMask(MCONTACT hContact, int mode, int count) void AddInSessionOrder(MCONTACT hContact, int mode, int ordernum, int writemode)
{
char szFormNumBuf[100];
- mir_snprintf(szFormNumBuf, _countof(szFormNumBuf), "%02u", ordernum);
+ mir_snprintf(szFormNumBuf, "%02u", ordernum);
if (mode == 0) {
ptrA szValue(db_get_sa(hContact, MODNAME, "LastSessionsMarks"));
@@ -149,7 +149,7 @@ void AddInSessionOrder(MCONTACT hContact, int mode, int ordernum, int writemode) db_set_s(hContact, MODNAME, "LastSessionsOrder", temp);
}
else if (writemode == 1) {
- mir_snprintf(szFormNumBuf, _countof(szFormNumBuf), "%02u%s", ordernum, "000000000000000000");
+ mir_snprintf(szFormNumBuf, "%02u%s", ordernum, "000000000000000000");
db_set_s(hContact, MODNAME, "LastSessionsOrder", szFormNumBuf);
}
}
@@ -229,7 +229,7 @@ BOOL ResaveSettings(char *szName, int iFirst, int iLimit, TCHAR *szBuffer) break;
char szNameBuf[256];
- mir_snprintf(szNameBuf, _countof(szNameBuf), "%s_%u", szName, i);
+ mir_snprintf(szNameBuf, "%s_%u", szName, i);
TCHAR *ptszTemp = db_get_tsa(NULL, MODNAME, szNameBuf);
db_set_ts(NULL, MODNAME, szNameBuf, szBuffer);
@@ -297,7 +297,7 @@ int LoadSessionToCombobox(HWND hdlg, BOOL mode, int iLimit, char* pszSetting, in }
for (int i = 0; i < iLimit; i++) {
- mir_snprintf(szBuffer, _countof(szBuffer), "%s_%u", pszSetting, i);
+ mir_snprintf(szBuffer, "%s_%u", pszSetting, i);
TCHAR *pszBuffer = db_get_tsa(NULL, MODNAME, szBuffer);
if (pszBuffer) {
if (!IsMarkedUserDefSession(i + iFirstNum) || mode == 1) {
@@ -326,7 +326,7 @@ int FillFavoritesMenu(HMENU hMenu, int iLimit) for (int i = 0; i < iLimit; i++) {
if (IsMarkedUserDefSession(i)) {
char szBuffer[256];
- mir_snprintf(szBuffer, _countof(szBuffer), "%s_%u", "UserSessionDsc", i);
+ mir_snprintf(szBuffer, "%s_%u", "UserSessionDsc", i);
TCHAR *pszBuffer = db_get_tsa(NULL, MODNAME, szBuffer);
if (pszBuffer) {
AppendMenu(hMenu, MF_STRING, i + 1, pszBuffer);
@@ -361,14 +361,14 @@ int CheckContactVisibility(MCONTACT hContact) void RenameUserDefSession(int ses_count, TCHAR* ptszNewName)
{
char szSession[256];
- mir_snprintf(szSession, _countof(szSession), "%s_%u", "UserSessionDsc", ses_count);
+ mir_snprintf(szSession, "%s_%u", "UserSessionDsc", ses_count);
db_set_ts(NULL, MODNAME, szSession, ptszNewName);
}
int MarkUserDefSession(int ses_count, BYTE bCheck)
{
char szSessionName[256];
- mir_snprintf(szSessionName, _countof(szSessionName), "%s_%u", "FavUserSession", ses_count);
+ mir_snprintf(szSessionName, "%s_%u", "FavUserSession", ses_count);
db_set_b(NULL, MODNAME, szSessionName, bCheck);
return 0;
}
@@ -376,7 +376,7 @@ int MarkUserDefSession(int ses_count, BYTE bCheck) BYTE IsMarkedUserDefSession(int ses_count)
{
char szSessionName[256];
- mir_snprintf(szSessionName, _countof(szSessionName), "%s_%u", "FavUserSession", ses_count);
+ mir_snprintf(szSessionName, "%s_%u", "FavUserSession", ses_count);
return db_get_b(NULL, MODNAME, szSessionName, 0);
}
|