summaryrefslogtreecommitdiff
path: root/plugins/FavContacts/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/FavContacts/src')
-rw-r--r--plugins/FavContacts/src/contact_cache.cpp8
-rw-r--r--plugins/FavContacts/src/main.cpp2
-rw-r--r--plugins/FavContacts/src/menu.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/plugins/FavContacts/src/contact_cache.cpp b/plugins/FavContacts/src/contact_cache.cpp
index 896eae5cca..d35e8c890e 100644
--- a/plugins/FavContacts/src/contact_cache.cpp
+++ b/plugins/FavContacts/src/contact_cache.cpp
@@ -148,8 +148,8 @@ void CContactCache::TContactInfo::LoadInfo()
CNF_CONAME, CNF_CODEPT, CNF_COCITY, CNF_COSTATE, CNF_COSTREET, CNF_COCOUNTRY
};
- for (int i = 0; i < SIZEOF(items); ++i)
- if (AppendInfo(p, SIZEOF(info) - (p - info), hContact, items[i]))
+ for (int i = 0; i < _countof(items); ++i)
+ if (AppendInfo(p, _countof(info) - (p - info), hContact, items[i]))
p += mir_tstrlen(p) + 1;
*p = 0;
@@ -180,7 +180,7 @@ bool CContactCache::filter(int rate, TCHAR *str)
HKL kbdLayoutActive = GetKeyboardLayout(GetCurrentThreadId());
HKL kbdLayouts[10];
- int nKbdLayouts = GetKeyboardLayoutList(SIZEOF(kbdLayouts), kbdLayouts);
+ int nKbdLayouts = GetKeyboardLayoutList(_countof(kbdLayouts), kbdLayouts);
TCHAR buf[256];
BYTE keyState[256] = { 0 };
@@ -193,7 +193,7 @@ bool CContactCache::filter(int rate, TCHAR *str)
for (i = 0; str[i]; ++i) {
UINT vk = VkKeyScanEx(str[i], kbdLayoutActive);
UINT scan = MapVirtualKeyEx(vk, 0, kbdLayoutActive);
- ToUnicodeEx(vk, scan, keyState, buf + i, SIZEOF(buf) - i, 0, kbdLayouts[iLayout]);
+ ToUnicodeEx(vk, scan, keyState, buf + i, _countof(buf) - i, 0, kbdLayouts[iLayout]);
}
buf[i] = 0;
}
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp
index 62579e9ba2..42cc773ae7 100644
--- a/plugins/FavContacts/src/main.cpp
+++ b/plugins/FavContacts/src/main.cpp
@@ -78,7 +78,7 @@ extern "C" __declspec(dllexport) int Load(void)
/////////////////////////////////////////////////////////////////////////////////////
- Icon_Register(g_hInst, LPGEN("Favorites"), iconList, SIZEOF(iconList));
+ Icon_Register(g_hInst, LPGEN("Favorites"), iconList, _countof(iconList));
LoadHttpApi();
return 0;
diff --git a/plugins/FavContacts/src/menu.cpp b/plugins/FavContacts/src/menu.cpp
index 0045f5da1b..2bb6fef449 100644
--- a/plugins/FavContacts/src/menu.cpp
+++ b/plugins/FavContacts/src/menu.cpp
@@ -394,7 +394,7 @@ static LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam,
g_filter[l-1] = 0;
}
else if (_istalnum(LOWORD(wParam))) {
- if (mir_tstrlen(g_filter) < SIZEOF(g_filter) - 1) {
+ if (mir_tstrlen(g_filter) < _countof(g_filter) - 1) {
TCHAR s[] = { LOWORD(wParam), 0 };
mir_tstrcat(g_filter, s);
}