Do not for copies in range-based for loops.

Spotted by clang++ 10.

(cherry picked from commit a85c48de5a)
This commit is contained in:
Jean-Marc Lasgouttes 2020-04-28 13:27:50 +02:00
parent 3beb9b326d
commit 4d410d0d32

View 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;