summaryrefslogtreecommitdiff
path: root/plugins/Import
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-14 19:59:06 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-14 19:59:06 +0300
commitdad59528ccd770301b29c7db8148ff8ab8e89c92 (patch)
treeb93aa1b9149ddf20d6317d44cf924be8d0be276a /plugins/Import
parent1a3f9ca88310cb9080a4c0073087bebc4c1e3a0a (diff)
reverse iterators for LIST<>
Diffstat (limited to 'plugins/Import')
-rw-r--r--plugins/Import/src/import.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp
index 590bce6a5a..7a133ae62b 100644
--- a/plugins/Import/src/import.cpp
+++ b/plugins/Import/src/import.cpp
@@ -165,11 +165,11 @@ void CopySettings(MCONTACT srcID, const char *szSrcModule, MCONTACT dstID, const
LIST<char> arSettings(50);
srcDb->EnumContactSettings(srcID, CopySettingsEnum, szSrcModule, &arSettings);
- for (int i = arSettings.getCount() - 1; i >= 0; i--) {
+ for (auto &it : arSettings.rev_iter()) {
DBVARIANT dbv = { 0 };
- if (!srcDb->GetContactSetting(srcID, szSrcModule, arSettings[i], &dbv))
- db_set(dstID, szDstModule, arSettings[i], &dbv);
- mir_free(arSettings[i]);
+ if (!srcDb->GetContactSetting(srcID, szSrcModule, it, &dbv))
+ db_set(dstID, szDstModule, it, &dbv);
+ mir_free(it);
}
}