From df6b0c988eb26339d4c7e4a1d0fe3b9717703c28 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 9 Mar 2018 19:32:32 +0300 Subject: more loop-related code cleaning --- plugins/UserInfoEx/src/Flags/svc_flags.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'plugins/UserInfoEx') diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp index a5352033ab..dcbf1af0c5 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp @@ -255,12 +255,9 @@ void SvcFlagsOnModulesLoaded() void SvcFlagsUnloadModule() { - //Uninit message winsow - for (int i = 0; i < gMsgWndList.getCount(); i++) { - //this should not happen - delete gMsgWndList[i]; - gMsgWndList.remove(i); - } + // Uninit message window + for (auto &it : gMsgWndList) + delete it; gMsgWndList.destroy(); // Uninit misc -- cgit v1.2.3