summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-02-21 20:26:50 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-02-21 20:26:50 +0300
commit1af62415a03e312a813a4f56ba9606d3ed9ab1ee (patch)
tree9745ef13d6034351896186626fd528a69ddd288a /src
parent06e4b579a26dc7bac30aa33edf55c986e03b1525 (diff)
these iterator variables became useless
Diffstat (limited to 'src')
-rw-r--r--src/core/stduserinfo/src/userinfo.cpp6
-rw-r--r--src/mir_app/src/chat_manager.cpp3
-rw-r--r--src/mir_app/src/proto_accs.cpp3
-rw-r--r--src/mir_app/src/sounds.cpp3
-rw-r--r--src/mir_app/src/srmm_toolbar.cpp3
-rw-r--r--src/mir_core/src/Windows/threads.cpp3
6 files changed, 7 insertions, 14 deletions
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp
index 96d15c8805..a8757ab008 100644
--- a/src/core/stduserinfo/src/userinfo.cpp
+++ b/src/core/stduserinfo/src/userinfo.cpp
@@ -119,10 +119,8 @@ class CUserInfoDlg : public CDlgBase
for (auto &it : items.rev_iter()) {
it->pDialog->SetContact(hContact);
- if (!it->pDialog->IsEmpty())
- continue;
-
- delete items.removeItem(&it);
+ if (it->pDialog->IsEmpty())
+ delete items.removeItem(&it);
}
if (items.getCount() == 0)
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp
index ed674c556a..74b3fa2a64 100644
--- a/src/mir_app/src/chat_manager.cpp
+++ b/src/mir_app/src/chat_manager.cpp
@@ -206,8 +206,7 @@ int SM_RemoveModule(const char *pszModule, bool removeContact)
if (pszModule == nullptr)
return FALSE;
- auto T = g_arSessions.rev_iter();
- for (auto &si : T)
+ for (auto &si : g_arSessions.rev_iter())
if (si->iType != GCW_SERVER && !mir_strcmpi(si->pszModule, pszModule))
SM_FreeSession(g_arSessions.removeItem(&si), removeContact);
diff --git a/src/mir_app/src/proto_accs.cpp b/src/mir_app/src/proto_accs.cpp
index 690c58bb76..d8d532f9e4 100644
--- a/src/mir_app/src/proto_accs.cpp
+++ b/src/mir_app/src/proto_accs.cpp
@@ -415,8 +415,7 @@ void UnloadAccountsModule()
if (!bModuleInitialized)
return;
- auto T = g_arAccounts.rev_iter();
- for (auto &it : T) {
+ for (auto &it : g_arAccounts.rev_iter()) {
UnloadAccount(it, 0);
g_arAccounts.removeItem(&it);
}
diff --git a/src/mir_app/src/sounds.cpp b/src/mir_app/src/sounds.cpp
index 8762adb26b..959289a3a1 100644
--- a/src/mir_app/src/sounds.cpp
+++ b/src/mir_app/src/sounds.cpp
@@ -367,8 +367,7 @@ void KillModuleSounds(CMPluginBase *pPlugin)
{
bool bFound = false;
- auto T = arSounds.rev_iter();
- for (auto &it : T)
+ for (auto &it : arSounds.rev_iter())
if (it->pPlugin == pPlugin) {
arSounds.removeItem(&it);
bFound = true;
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp
index fb593ea1a4..45450eaa26 100644
--- a/src/mir_app/src/srmm_toolbar.cpp
+++ b/src/mir_app/src/srmm_toolbar.cpp
@@ -819,8 +819,7 @@ void KillModuleToolbarIcons(CMPluginBase *pPlugin)
{
int oldCount = arButtonsList.getCount();
- auto T = arButtonsList.rev_iter();
- for (auto &cbd : T)
+ for (auto &cbd : arButtonsList.rev_iter())
if (cbd->m_pPlugin == pPlugin)
delete arButtonsList.removeItem(&cbd);
diff --git a/src/mir_core/src/Windows/threads.cpp b/src/mir_core/src/Windows/threads.cpp
index c33a80faed..b48a9c7b79 100644
--- a/src/mir_core/src/Windows/threads.cpp
+++ b/src/mir_core/src/Windows/threads.cpp
@@ -230,8 +230,7 @@ static void __cdecl KillObjectThreadsWorker(void* owner)
// forcibly kill all remaining threads after 5 secs
mir_cslock lck(csThreads);
- auto T = threads.rev_iter();
- for (auto &it : T) {
+ for (auto &it : threads.rev_iter()) {
if (it->pObject == owner) {
char szModuleName[MAX_PATH];
GetModuleFileNameA(it->hOwner, szModuleName, sizeof(szModuleName));