diff options
author | Kevin Smith <git@kismith.co.uk> | 2013-03-31 15:46:21 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2013-04-05 07:54:55 (GMT) |
commit | a6b61da8e42e996bc7bbe4babc618e3708639936 (patch) | |
tree | 5977063fa6b8ffe2a315317f541009083e15692b /SwifTools | |
parent | 1924342540d855d07eadb564ad997df1345fb115 (diff) | |
download | swift-a6b61da8e42e996bc7bbe4babc618e3708639936.zip swift-a6b61da8e42e996bc7bbe4babc618e3708639936.tar.bz2 |
Silence a couple of warnings
Change-Id: I86569f168987c1b02bd4a45e569b1acffa3f8007
Diffstat (limited to 'SwifTools')
-rw-r--r-- | SwifTools/SpellCheckerFactory.cpp | 8 |
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 } |