summaryrefslogtreecommitdiff
path: root/protocols/Omegle/src/dialogs.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
commit4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch)
tree9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /protocols/Omegle/src/dialogs.cpp
parentf0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (diff)
SIZEOF replaced with more secure analog - _countof
git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Omegle/src/dialogs.cpp')
-rw-r--r--protocols/Omegle/src/dialogs.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/Omegle/src/dialogs.cpp b/protocols/Omegle/src/dialogs.cpp
index c2f13d2995..7d5754e8a3 100644
--- a/protocols/Omegle/src/dialogs.cpp
+++ b/protocols/Omegle/src/dialogs.cpp
@@ -47,7 +47,7 @@ static void StoreDBText(OmegleProto* ppro, HWND hwnd, int idCtrl, const char* sz
{
TCHAR tstr[250+1];
- GetDlgItemText(hwnd, idCtrl, tstr, SIZEOF(tstr));
+ GetDlgItemText(hwnd, idCtrl, tstr, _countof(tstr));
if (tstr[0] != '\0') {
db_set_ts(NULL, ppro->m_szModuleName, szSetting, tstr);
} else {
@@ -73,12 +73,12 @@ INT_PTR CALLBACK OmegleAccountProc( HWND hwnd, UINT message, WPARAM wparam, LPAR
// Server
SendDlgItemMessageA(hwnd, IDC_SERVER, CB_INSERTSTRING, 0, reinterpret_cast<LPARAM>(Translate(servers[0])));
- for(size_t i=1; i<SIZEOF(servers); i++)
+ for(size_t i=1; i<_countof(servers); i++)
SendDlgItemMessageA(hwnd, IDC_SERVER, CB_INSERTSTRING, i, reinterpret_cast<LPARAM>(servers[i]));
SendDlgItemMessage(hwnd, IDC_SERVER, CB_SETCURSEL, db_get_b(NULL, proto->m_szModuleName, OMEGLE_KEY_SERVER, 0), 0);
// Language
- for(size_t i=0; i<SIZEOF(languages); i++)
+ for(size_t i=0; i<_countof(languages); i++)
SendDlgItemMessageA(hwnd, IDC_LANGUAGE, CB_INSERTSTRING, i, reinterpret_cast<LPARAM>(Translate(languages[i].lang)));
SendDlgItemMessage(hwnd, IDC_LANGUAGE, CB_SETCURSEL, db_get_b(NULL, proto->m_szModuleName, OMEGLE_KEY_LANGUAGE, 0), 0);
@@ -150,12 +150,12 @@ INT_PTR CALLBACK OmegleOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPAR
// Server
SendDlgItemMessageA(hwnd, IDC_SERVER, CB_INSERTSTRING, 0, reinterpret_cast<LPARAM>(Translate(servers[0])));
- for(size_t i=1; i<SIZEOF(servers); i++)
+ for(size_t i=1; i<_countof(servers); i++)
SendDlgItemMessageA(hwnd, IDC_SERVER, CB_INSERTSTRING, i, reinterpret_cast<LPARAM>(servers[i]));
SendDlgItemMessage(hwnd, IDC_SERVER, CB_SETCURSEL, db_get_b(NULL, proto->m_szModuleName, OMEGLE_KEY_SERVER, 0), 0);
// Language
- for(size_t i=0; i<SIZEOF(languages); i++)
+ for(size_t i=0; i<_countof(languages); i++)
SendDlgItemMessageA(hwnd, IDC_LANGUAGE, CB_INSERTSTRING, i, reinterpret_cast<LPARAM>(Translate(languages[i].lang)));
SendDlgItemMessage(hwnd, IDC_LANGUAGE, CB_SETCURSEL, db_get_b(NULL, proto->m_szModuleName, OMEGLE_KEY_LANGUAGE, 0), 0);