summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Voicu <vladv@rosedu.org>2012-03-08 13:10:15 (GMT)
committervlad <vlad@tyrion.(none)>2012-10-13 13:55:45 (GMT)
commitafdb2b3a61695b42162d09189d083e728da0c74f (patch)
tree5b99b51d9888bd8bd0d74f677751689acb6111a7 /SwifTools/HunspellChecker.cpp
parent9a4873e153ae16ef68e7c60de376ade7882874f0 (diff)
downloadswift-contrib-afdb2b3a61695b42162d09189d083e728da0c74f.zip
swift-contrib-afdb2b3a61695b42162d09189d083e728da0c74f.tar.bz2
Gracefully degrade when hunspell is not present
Diffstat (limited to 'SwifTools/HunspellChecker.cpp')
-rw-r--r--SwifTools/HunspellChecker.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/SwifTools/HunspellChecker.cpp b/SwifTools/HunspellChecker.cpp
index 6c1b4bb..fa5917a 100644
--- a/SwifTools/HunspellChecker.cpp
+++ b/SwifTools/HunspellChecker.cpp
@@ -43,7 +43,8 @@ void HunspellChecker::checkFragment(const std::string& fragment, PositionPairLis
for (PositionPairList::iterator it = misspelledPositions.begin(); it != misspelledPositions.end();) {
if (isCorrect(fragment.substr(boost::get<0>(*it), boost::get<1>(*it) - boost::get<0>(*it)))) {
misspelledPositions.erase(it++);
- } else {
+ }
+ else {
++it;
}
}