summaryrefslogtreecommitdiff
path: root/plugins/ListeningTo
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ListeningTo')
-rw-r--r--plugins/ListeningTo/src/listeningto.cpp2
-rw-r--r--plugins/ListeningTo/src/players/mradio.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp
index ad77475d8a..47c452af1a 100644
--- a/plugins/ListeningTo/src/listeningto.cpp
+++ b/plugins/ListeningTo/src/listeningto.cpp
@@ -178,7 +178,7 @@ int ModulesLoaded(WPARAM, LPARAM)
EnableDisablePlayers();
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (auto &hContact : contact_iter()) {
char *proto = GetContactProto(hContact);
if (proto != nullptr) {
DBVARIANT dbv;
diff --git a/plugins/ListeningTo/src/players/mradio.cpp b/plugins/ListeningTo/src/players/mradio.cpp
index 60a88ec252..b65a7e2db4 100644
--- a/plugins/ListeningTo/src/players/mradio.cpp
+++ b/plugins/ListeningTo/src/players/mradio.cpp
@@ -34,7 +34,7 @@ void MRadio::EnableDisable()
int MRadio::GetData()
{
- for (MCONTACT hContact = db_find_first("mRadio"); hContact; hContact = db_find_next(hContact, "mRadio")) {
+ for (auto &hContact : contact_iter("mRadio")) {
WORD status = db_get_w(hContact, "mRadio", "Status", ID_STATUS_OFFLINE);
if (status != ID_STATUS_ONLINE)
continue;