summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools')
-rw-r--r--SwifTools/SpellCheckerFactory.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/SwifTools/SpellCheckerFactory.cpp b/SwifTools/SpellCheckerFactory.cpp
index d068d90..428e1a5 100644
--- a/SwifTools/SpellCheckerFactory.cpp
+++ b/SwifTools/SpellCheckerFactory.cpp
@@ -22,18 +22,20 @@ namespace Swift {
SpellCheckerFactory::SpellCheckerFactory() {
}
-SpellChecker* SpellCheckerFactory::createSpellChecker(const std::string& dictFile) {
#ifdef HAVE_HUNSPELL
+SpellChecker* SpellCheckerFactory::createSpellChecker(const std::string& dictFile) {
std::string affixFile(dictFile);
boost::replace_all(affixFile, ".dic", ".aff");
if ((boost::filesystem::exists(dictFile)) && (boost::filesystem::exists(affixFile))) {
return new HunspellChecker(affixFile.c_str(), dictFile.c_str());
}
// If dictionaries don't exist disable the checker
+ return NULL;
+}
#elif defined(SWIFTEN_PLATFORM_MACOSX)
+SpellChecker* SpellCheckerFactory::createSpellChecker(const std::string& /*dictFile*/) {
return new MacOSXChecker();
-#endif
- return NULL;
}
+#endif
}