summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools')
-rw-r--r--SwifTools/HunspellChecker.cpp3
-rw-r--r--SwifTools/SpellCheckerFactory.h4
2 files changed, 6 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;
}
}
diff --git a/SwifTools/SpellCheckerFactory.h b/SwifTools/SpellCheckerFactory.h
index d58a9ec..5519db5 100644
--- a/SwifTools/SpellCheckerFactory.h
+++ b/SwifTools/SpellCheckerFactory.h
@@ -6,6 +6,10 @@
#pragma once
+#ifdef HAVE_HUNSPELL
+#define HAVE_SPELLCHECKER
+#endif
+
namespace Swift {
class SpellChecker;
class SpellCheckerFactory {