diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-21 18:37:57 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-21 18:40:14 +0300 |
commit | beb15c0662d6e31237f32983f7e58141054277c5 (patch) | |
tree | e4c9af83c18645ed42a91217e7034ddac1d4cdd9 /src/mir_core/src/langpack.cpp | |
parent | b6de8047c1113030b64c81e58c2ba37c062639ae (diff) |
mir_core: C++'11 iterators
Diffstat (limited to 'src/mir_core/src/langpack.cpp')
-rw-r--r-- | src/mir_core/src/langpack.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mir_core/src/langpack.cpp b/src/mir_core/src/langpack.cpp index 83885656fa..3fdd9f6d3d 100644 --- a/src/mir_core/src/langpack.cpp +++ b/src/mir_core/src/langpack.cpp @@ -720,13 +720,12 @@ void UnloadLangPackModule() {
if (!bModuleInitialized) return;
- int i;
- for (i = 0; i < lMuuids.getCount(); i++)
- mir_free(lMuuids[i]);
+ for (auto &it : lMuuids)
+ mir_free(it);
lMuuids.destroy();
LangPackEntry *p = g_pEntries;
- for (i = 0; i < g_entryCount; i++, p++) {
+ for (int i = 0; i < g_entryCount; i++, p++) {
if (p->pNext != nullptr) {
for (LangPackEntry *p1 = p->pNext; p1 != nullptr;) {
LangPackEntry *p2 = p1; p1 = p1->pNext;
|