diff options
Diffstat (limited to 'plugins/Weather/src/weather_mwin.cpp')
-rw-r--r-- | plugins/Weather/src/weather_mwin.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index b748173aeb..7f70b659d0 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -384,33 +384,25 @@ void InitMwin(void) FontRegisterT(&fontid);
}
- HANDLE hContact = db_find_first();
- while(hContact)
- {
+ for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
// see if the contact is a weather contact
- if (IsMyContact(hContact))
- {
+ if (IsMyContact(hContact)) {
if (db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0))
addWindow(hContact);
}
- hContact = db_find_next(hContact);
}
hFontHook = HookEvent(ME_FONT_RELOAD, RedrawFrame);
}
void DestroyMwin(void)
{
- HANDLE hContact = db_find_first();
- while(hContact)
- {
+ for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
// see if the contact is a weather contact
- if (IsMyContact(hContact))
- {
+ if (IsMyContact(hContact)) {
DWORD frameId = db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0);
if (frameId)
CallService(MS_CLIST_FRAMES_REMOVEFRAME, frameId, 0);
}
- hContact = db_find_next(hContact);
}
UnregisterClass( _T("WeatherFrame"), hInst);
UnhookEvent(hFontHook);
|