r25057 by jghali - Re-add small optimization to HunspellDict::suggest()
scribus-commit
scribus-commit at lists.scribus.net
Thu Mar 24 21:29:55 UTC 2022
Author: jghali
Date: Thu Mar 24 21:29:55 2022
New Revision: 25057
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=25057
Log:
Re-add small optimization to HunspellDict::suggest()
Modified:
trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldict.cpp
Modified: trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldict.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25057&path=/trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldict.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldict.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldict.cpp Thu Mar 24 21:29:55 2022
@@ -72,6 +72,7 @@
return replacements;
std::string s = word.toStdString();
std::vector<std::string> sugglist = m_hunspell->suggest(s);
+ replacements.reserve(sugglist.size());
for (uint i = 0; i < sugglist.size(); ++i)
replacements << m_codec->toUnicode(QByteArray::fromStdString(sugglist[i]));
return replacements;
More information about the scribus-commit
mailing list