summaryrefslogtreecommitdiff
path: root/plugins/Folders
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Folders')
-rw-r--r--plugins/Folders/src/dlg_handlers.cpp4
-rw-r--r--plugins/Folders/src/folderItem.cpp4
-rw-r--r--plugins/Folders/src/services.cpp8
3 files changed, 8 insertions, 8 deletions
diff --git a/plugins/Folders/src/dlg_handlers.cpp b/plugins/Folders/src/dlg_handlers.cpp
index ff347d9ba2..b5e6668912 100644
--- a/plugins/Folders/src/dlg_handlers.cpp
+++ b/plugins/Folders/src/dlg_handlers.cpp
@@ -91,7 +91,7 @@ static void SaveItem(HWND hWnd, PFolderItem item, int bEnableApply)
return;
TCHAR buffer[MAX_FOLDER_SIZE];
- GetEditText(hWnd, buffer, SIZEOF(buffer));
+ GetEditText(hWnd, buffer, _countof(buffer));
item->SetFormat(buffer);
if (bEnableApply)
@@ -123,7 +123,7 @@ static INT_PTR CALLBACK DlgProcVariables(HWND hWnd, UINT msg, WPARAM wParam, LPA
switch (msg) {
case WM_INITDIALOG:
- mir_sntprintf(tszMessage, SIZEOF(tszMessage), _T("%s\r\n%s\r\n\r\n%s\t\t%s\r\n%%miranda_path%%\t\t%s\r\n%%profile_path%%\t\t%s\r\n\t\t\t%s\r\n%%current_profile%%\t\t%s\r\n\t\t\t%s\r\n\r\n\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n\r\n%s\r\n%s\r\n%s\r\n%%miranda_path%%\t\t\t%s\r\n%%profile_path%%\t\t\t%s\r\n%%current_profile%%\t\t\t%s\r\n%%temp%%\t\t\t\t%s\r\n%%profile_path%%\\%%current_profile%%\t%s\r\n%%miranda_path%%\\plugins\\config\t%s\r\n' %%miranda_path%%\\\\\\\\ '\t\t%s\r\n\r\n%s"),
+ mir_sntprintf(tszMessage, _countof(tszMessage), _T("%s\r\n%s\r\n\r\n%s\t\t%s\r\n%%miranda_path%%\t\t%s\r\n%%profile_path%%\t\t%s\r\n\t\t\t%s\r\n%%current_profile%%\t\t%s\r\n\t\t\t%s\r\n\r\n\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n\r\n%s\r\n%s\r\n%s\r\n%%miranda_path%%\t\t\t%s\r\n%%profile_path%%\t\t\t%s\r\n%%current_profile%%\t\t\t%s\r\n%%temp%%\t\t\t\t%s\r\n%%profile_path%%\\%%current_profile%%\t%s\r\n%%miranda_path%%\\plugins\\config\t%s\r\n' %%miranda_path%%\\\\\\\\ '\t\t%s\r\n\r\n%s"),
TranslateT("Don't forget to click on Apply to save the changes. If you don't then the changes won't"),
TranslateT("be saved to the database, they will only be valid for this session."),
TranslateT("Variable string"),
diff --git a/plugins/Folders/src/folderItem.cpp b/plugins/Folders/src/folderItem.cpp
index a66984ab7e..22043a172c 100644
--- a/plugins/Folders/src/folderItem.cpp
+++ b/plugins/Folders/src/folderItem.cpp
@@ -114,8 +114,8 @@ int CFolderItem::FolderDeleteOldDirectory(int showFolder)
void CFolderItem::GetDataFromDatabase(const TCHAR *szNotFound)
{
char szSettingName[256];
- strcpy_s(szSettingName, SIZEOF(szSettingName), m_szSection);
- strcat_s(szSettingName, SIZEOF(szSettingName), m_szName);
+ strcpy_s(szSettingName, _countof(szSettingName), m_szSection);
+ strcat_s(szSettingName, _countof(szSettingName), m_szName);
ptrT tszValue(db_get_tsa(NULL, ModuleName, szSettingName));
SetFormat(tszValue != NULL ? tszValue : szNotFound);
diff --git a/plugins/Folders/src/services.cpp b/plugins/Folders/src/services.cpp
index dfd24f6b59..80fd22c6b2 100644
--- a/plugins/Folders/src/services.cpp
+++ b/plugins/Folders/src/services.cpp
@@ -79,15 +79,15 @@ INT_PTR GetPathService(WPARAM wParam, LPARAM lParam)
int InitServices()
{
- CallService(MS_DB_GETPROFILEPATHT, SIZEOF(szCurrentProfilePath), (LPARAM)szCurrentProfilePath);
- CallService(MS_DB_GETPROFILENAMET, SIZEOF(szCurrentProfile), (LPARAM)szCurrentProfile);
+ CallService(MS_DB_GETPROFILEPATHT, _countof(szCurrentProfilePath), (LPARAM)szCurrentProfilePath);
+ CallService(MS_DB_GETPROFILENAMET, _countof(szCurrentProfile), (LPARAM)szCurrentProfile);
TCHAR *pos = _tcsrchr(szCurrentProfile, '.'); if (pos) *pos = 0;
- GetModuleFileName(GetModuleHandleA("mir_app.dll"), szMirandaPath, SIZEOF(szMirandaPath));
+ GetModuleFileName(GetModuleHandleA("mir_app.dll"), szMirandaPath, _countof(szMirandaPath));
pos = _tcsrchr(szMirandaPath, '\\'); if (pos) *pos = 0;
TCHAR *szTemp = Utils_ReplaceVarsT(_T("%miranda_userdata%"));
- mir_sntprintf(szUserDataPath, SIZEOF(szUserDataPath), szTemp);
+ mir_sntprintf(szUserDataPath, _countof(szUserDataPath), szTemp);
mir_free(szTemp);
CreateServiceFunction(MS_FOLDERS_GET_PATH, GetPathService);