summaryrefslogtreecommitdiff
path: root/plugins/Msg_Export/src/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Msg_Export/src/utils.cpp')
-rwxr-xr-xplugins/Msg_Export/src/utils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index 7024e28f42..a6c772801c 100755
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -787,7 +787,7 @@ void UpdateFileToColWidth()
{
clFileTo1ColWidth.clear();
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (auto &hContact : contact_iter()) {
tstring sNick = pcli->pfnGetContactDisplayName(hContact, 0);
string::size_type &rnValue = clFileTo1ColWidth[GetFilePathFromUser(hContact)];
if (rnValue < sNick.size())
@@ -1395,7 +1395,7 @@ int nContactDeleted(WPARAM wparam, LPARAM /*lparam*/)
tstring sFilePath = GetFilePathFromUser(hContact);
// Test if there is another user using this file
- for (MCONTACT hOtherContact = db_find_first(); hOtherContact; hOtherContact = db_find_next(hOtherContact))
+ for (auto &hOtherContact : contact_iter())
if (hContact != hOtherContact && sFilePath == GetFilePathFromUser(hOtherContact))
return 0; // we found another contact abort mission :-)