]> git.lyx.org Git - lyx.git/commitdiff
Do not for copies in range-based for loops.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 28 Apr 2020 11:27:50 +0000 (13:27 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 15 Oct 2021 15:43:12 +0000 (17:43 +0200)
Spotted by clang++ 10.

(cherry picked from commit a85c48de5a15c4f70f79a53b451fbe0d083e9ece)

src/HunspellChecker.cpp

index 593a123bf9440a01be4f08dc99ecffe02d9a16b3..c211b47c85747e8085503708d14138cd5ec0e7c4 100644 (file)
@@ -424,7 +424,7 @@ void HunspellChecker::suggest(WordLangTuple const & wl,
        string const word_to_check = to_iconv_encoding(wl.word(), encoding);
 #ifdef HAVE_HUNSPELL_CXXABI
        vector<string> wlst = h->suggest(word_to_check);
-       for (auto const s : wlst)
+       for (auto const s : wlst)
                suggestions.push_back(remap_result(from_iconv_encoding(s, encoding)));
 #else
        char ** suggestion_list;
@@ -449,7 +449,7 @@ void HunspellChecker::stem(WordLangTuple const & wl,
        string const word_to_check = to_iconv_encoding(wl.word(), encoding);
 #ifdef HAVE_HUNSPELL_CXXABI
        vector<string> wlst = h->stem(word_to_check);
-       for (auto const s : wlst)
+       for (auto const s : wlst)
                suggestions.push_back(from_iconv_encoding(s, encoding));
 #else
        char ** suggestion_list;