summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdbx
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:03 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:14 +0300
commit477a6ea70d0bb1b1dfe9cbd9a15b6dad0284ddeb (patch)
tree247eed13a5231c3983e343f0b7fc2a95012353c2 /plugins/Dbx_mdbx
parent9d0174ebe2bd005418855b18f737c36d5c20ab4a (diff)
all another C++'11 iterators
Diffstat (limited to 'plugins/Dbx_mdbx')
-rw-r--r--plugins/Dbx_mdbx/src/dbcontacts.cpp6
-rw-r--r--plugins/Dbx_mdbx/src/dbsettings.cpp4
2 files changed, 4 insertions, 6 deletions
diff --git a/plugins/Dbx_mdbx/src/dbcontacts.cpp b/plugins/Dbx_mdbx/src/dbcontacts.cpp
index 72a88492d1..8c2efb9df1 100644
--- a/plugins/Dbx_mdbx/src/dbcontacts.cpp
+++ b/plugins/Dbx_mdbx/src/dbcontacts.cpp
@@ -130,8 +130,7 @@ BOOL CDbxMDBX::MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub)
LIST<EventItem> list(1000);
GatherContactHistory(ccSub->contactID, list);
- for (int i = 0; i < list.getCount(); i++) {
- EventItem *EI = list[i];
+ for (auto &EI : list) {
{
txn_ptr trnlck(m_env);
@@ -163,8 +162,7 @@ BOOL CDbxMDBX::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub)
LIST<EventItem> list(1000);
GatherContactHistory(ccSub->contactID, list);
- for (int i = 0; i < list.getCount(); i++) {
- EventItem *EI = list[i];
+ for (auto &EI : list) {
{
txn_ptr trnlck(m_env);
DBEventSortingKey insVal = { ccMeta->contactID, EI->eventId, EI->ts };
diff --git a/plugins/Dbx_mdbx/src/dbsettings.cpp b/plugins/Dbx_mdbx/src/dbsettings.cpp
index 775e69b733..b4491189bf 100644
--- a/plugins/Dbx_mdbx/src/dbsettings.cpp
+++ b/plugins/Dbx_mdbx/src/dbsettings.cpp
@@ -399,8 +399,8 @@ STDMETHODIMP_(BOOL) CDbxMDBX::EnumContactSettings(MCONTACT hContact, DBSETTINGEN
}
int result = -1;
- for (int i=0; i < arKeys.getCount(); i++)
- result = pfnEnumProc(arKeys[i], param);
+ for (auto &it : arKeys)
+ result = pfnEnumProc(it, param);
return result;
}