summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 00:33:09 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 00:33:09 +0000
commitfaccf4803bd25abbb27402ab1127d085efd9061f (patch)
tree36ff52c5affad34aa47c98a18ca246ec474d13ec /plugins/DbEditorPP
parentb2fad485cd5b41744ef0cc4a02722c021afd926c (diff)
code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@11185 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/DbEditorPP')
-rw-r--r--plugins/DbEditorPP/src/settinglist.cpp8
-rw-r--r--plugins/DbEditorPP/src/watchedvars.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp
index b3b5586ade..51c93605ae 100644
--- a/plugins/DbEditorPP/src/settinglist.cpp
+++ b/plugins/DbEditorPP/src/settinglist.cpp
@@ -658,8 +658,8 @@ INT_PTR CALLBACK SettingsCompare(LPARAM lParam1, LPARAM lParam2, LPARAM myParam)
const int maxSize = 1024;
TCHAR text1[maxSize];
TCHAR text2[maxSize];
- ListView_GetItemText(params.hList, lParam1, params.column, text1, maxSize);
- ListView_GetItemText(params.hList, lParam2, params.column, text2, maxSize);
+ ListView_GetItemText(params.hList, lParam1, params.column, text1, SIZEOF(text1));
+ ListView_GetItemText(params.hList, lParam2, params.column, text2, SIZEOF(text2));
int res = _tcsicmp(text1, text2);
res = (params.column == lastColumn) ? -res : res;
@@ -710,7 +710,7 @@ void SettingsListWM_NOTIFY(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
char setting[256];
SendMessage(info->hwnd2Edit, WM_COMMAND, MAKEWPARAM(IDOK, 0), 0);
info->hwnd2Edit = NULL;
- ListView_GetItemText(GetDlgItem(hwnd, IDC_SETTINGS), hti.iItem, 0, setting, 256);
+ ListView_GetItemText(GetDlgItem(hwnd, IDC_SETTINGS), hti.iItem, 0, setting, SIZEOF(setting));
editSetting(info->hContact, info->module, setting);
}
else EditLabel(GetDlgItem(hwnd, IDC_SETTINGS), hti.iItem, hti.iSubItem);
@@ -839,7 +839,7 @@ void SettingsListRightClick(HWND hwnd, WPARAM wParam, LPARAM lParam) // hwnd her
lvi.cchTextMax = SIZEOF(setting);
ListView_GetItem(hSettings, &lvi);
- ListView_GetItemText(hSettings, hti.iItem, 2, type, 8);
+ ListView_GetItemText(hSettings, hti.iItem, 2, type, SIZEOF(type));
switch (lvi.iImage) {
case 4: // STRING
diff --git a/plugins/DbEditorPP/src/watchedvars.cpp b/plugins/DbEditorPP/src/watchedvars.cpp
index 1f1a483bdd..e2500cdcd6 100644
--- a/plugins/DbEditorPP/src/watchedvars.cpp
+++ b/plugins/DbEditorPP/src/watchedvars.cpp
@@ -264,8 +264,8 @@ INT_PTR CALLBACK WatchDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
ItemInfo ii;
ii.hContact = (MCONTACT)lvi.lParam;
- ListView_GetItemText(GetDlgItem(hwnd,IDC_VARS),hti.iItem,1,ii.module,128);
- ListView_GetItemText(GetDlgItem(hwnd,IDC_VARS),hti.iItem,2,ii.setting,128);
+ ListView_GetItemText(GetDlgItem(hwnd, IDC_VARS), hti.iItem, 1, ii.module, SIZEOF(ii.module));
+ ListView_GetItemText(GetDlgItem(hwnd, IDC_VARS), hti.iItem, 2, ii.setting, SIZEOF(ii.setting));
ii.type = FW_SETTINGNAME;
SendMessage(hwnd2mainWindow,WM_FINDITEM,(WPARAM)&ii,0);
}