diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-16 12:09:30 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-16 12:09:38 +0300 |
commit | a7e5e613f86963c8bf82248ab044e0ea36e42fbc (patch) | |
tree | 39e0e6b3ab4bcb55255302d3d1e989b31247bf7b /plugins/SpellChecker/src/spellchecker.cpp | |
parent | ecbca42677af470d672e66d3f6950af208f8f212 (diff) |
LIST<>::indexOf(T**) - fast index calculation for direct iterators
Diffstat (limited to 'plugins/SpellChecker/src/spellchecker.cpp')
-rw-r--r-- | plugins/SpellChecker/src/spellchecker.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index 4b495303c1..9770861c9c 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -144,12 +144,11 @@ static int ModulesLoaded(WPARAM, LPARAM) sid.section.w = LPGENW("Spell Checker") L"/" LPGENW("Flags"); // Get language flags - for (int i = 0; i < languages.getCount(); i++) { - auto *p = languages[i]; + for (auto &p : languages) { sid.description.w = p->full_name; char lang[32]; - mir_snprintf(lang, "spell_lang_%d", i); + mir_snprintf(lang, "spell_lang_%d", languages.indexOf(&p)); sid.pszName = lang; HICON hFlag = nullptr, hFlagIcoLib = nullptr; |