diff options
Diffstat (limited to 'plugins/WebView/src/webview.cpp')
-rw-r--r-- | plugins/WebView/src/webview.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/WebView/src/webview.cpp b/plugins/WebView/src/webview.cpp index 9c77b5e6af..f15977bb1d 100644 --- a/plugins/WebView/src/webview.cpp +++ b/plugins/WebView/src/webview.cpp @@ -94,7 +94,7 @@ void FillFontListThread(void *param) /*****************************************************************************/
void TxtclrLoop()
{
- for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
+ for (auto &hContact : contact_iter(MODULENAME)) {
HWND hwndDlg = WindowList_Find(hWindowList, hContact);
SetDlgItemText(hwndDlg, IDC_DATA, L"");
InvalidateRect(hwndDlg, nullptr, 1);
@@ -104,7 +104,7 @@ void TxtclrLoop() /*****************************************************************************/
void BGclrLoop()
{
- for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
+ for (auto &hContact : contact_iter(MODULENAME)) {
HWND hwndDlg = (WindowList_Find(hWindowList, hContact));
SetDlgItemText(hwndDlg, IDC_DATA, L"");
SendDlgItemMessage(hwndDlg, IDC_DATA, EM_SETBKGNDCOLOR, 0, BackgoundClr);
@@ -118,7 +118,7 @@ void StartUpdate(void*) StartUpDelay = 1;
Sleep(((db_get_dw(NULL, MODULENAME, START_DELAY_KEY, 0)) * SECOND));
- for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
+ for (auto &hContact : contact_iter(MODULENAME))
GetData((void*)hContact);
StartUpDelay = 0;
@@ -128,7 +128,7 @@ void StartUpdate(void*) void ContactLoop(void*)
{
if (StartUpDelay == 0) {
- for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
+ for (auto &hContact : contact_iter(MODULENAME)) {
GetData((void*)hContact);
Sleep(10); // avoid 100% CPU
}
|