summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/ex_import
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/UserInfoEx/src/ex_import')
-rw-r--r--plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp4
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp2
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp2
3 files changed, 3 insertions, 5 deletions
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
index 945d404c2b..ec1cb4b629 100644
--- a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
+++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
@@ -273,9 +273,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar
// module must exist in at least one contact
if (pDat->ExImContact->Typ != EXIM_CONTACT) // TRUE = All Contacts
{
- MCONTACT hContact;
-
- for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
+ for (auto &hContact: Contacts()) {
// ignore empty modules
if (!DB::Module::IsEmpty(hContact, p)) {
pszProto = Proto_GetBaseAccountName(hContact);
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
index dc826a7139..a83438b9ad 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
@@ -158,7 +158,7 @@ int SvcExImINI_Export(lpExImParam ExImContact, const wchar_t *pszFileName)
ExportContact(NULL, &Modules, file);
fprintf(file, "\n\n");
// Contacts
- for (MCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
+ for (auto &hContact: Contacts()) {
ExportContact(hContact, &Modules, file);
fprintf(file, "\n\n");
}
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp
index 3022575e8e..09e8040a50 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp
@@ -137,7 +137,7 @@ int CFileXml::Export(lpExImParam ExImContact, const wchar_t *pszFileName)
vContact.Export(xmlfile, &Modules);
// loop for all other contact
- for (MCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
+ for (auto &hContact: Contacts()) {
switch (ExImContact->Typ) {
case EXIM_ALL:
case EXIM_GROUP: