diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-21 18:40:03 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-21 18:40:14 +0300 |
commit | 477a6ea70d0bb1b1dfe9cbd9a15b6dad0284ddeb (patch) | |
tree | 247eed13a5231c3983e343f0b7fc2a95012353c2 /plugins/SpellChecker/src/options.cpp | |
parent | 9d0174ebe2bd005418855b18f737c36d5c20ab4a (diff) |
all another C++'11 iterators
Diffstat (limited to 'plugins/SpellChecker/src/options.cpp')
-rw-r--r-- | plugins/SpellChecker/src/options.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/SpellChecker/src/options.cpp b/plugins/SpellChecker/src/options.cpp index 5dd5db0a0d..6f0d0e22e9 100644 --- a/plugins/SpellChecker/src/options.cpp +++ b/plugins/SpellChecker/src/options.cpp @@ -98,13 +98,11 @@ void LoadOptions() db_free(&dbv);
}
- int i;
- for (i = 0; i < languages.getCount(); i++)
- if (mir_wstrcmp(languages[i]->language, opts.default_language) == 0)
- break;
+ for (auto &it : languages)
+ if (mir_wstrcmp(it->language, opts.default_language) == 0)
+ return;
- if (i >= languages.getCount())
- mir_wstrcpy(opts.default_language, languages[0]->language);
+ mir_wstrcpy(opts.default_language, languages[0]->language);
}
static void DrawItem(LPDRAWITEMSTRUCT lpdis, Dictionary *dict)
|