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/utils.cpp | |
parent | 9d0174ebe2bd005418855b18f737c36d5c20ab4a (diff) |
all another C++'11 iterators
Diffstat (limited to 'plugins/SpellChecker/src/utils.cpp')
-rw-r--r-- | plugins/SpellChecker/src/utils.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index 1b88e94621..7dfcd12884 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -728,11 +728,8 @@ void GetUserProtoLanguageSetting(Dialog *dlg, MCONTACT hContact, char *group, ch if (dbv.type == DBVT_WCHAR && dbv.ptszVal != nullptr) {
wchar_t *lang = dbv.ptszVal;
- for (int i = 0; i < languages.getCount(); i++) {
- Dictionary *dict = languages[i];
- if (mir_wstrcmpi(dict->localized_name, lang) == 0
- || mir_wstrcmpi(dict->english_name, lang) == 0
- || mir_wstrcmpi(dict->language, lang) == 0) {
+ for (auto &dict : languages) {
+ if (mir_wstrcmpi(dict->localized_name, lang) == 0 || mir_wstrcmpi(dict->english_name, lang) == 0 || mir_wstrcmpi(dict->language, lang) == 0) {
mir_wstrncpy(dlg->lang_name, dict->language, _countof(dlg->lang_name));
break;
}
|