From a6b61da8e42e996bc7bbe4babc618e3708639936 Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Sun, 31 Mar 2013 16:46:21 +0100 Subject: Silence a couple of warnings Change-Id: I86569f168987c1b02bd4a45e569b1acffa3f8007 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 } diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp index ad7f76a..39ec8c3 100644 --- a/Swift/Controllers/Chat/ChatControllerBase.cpp +++ b/Swift/Controllers/Chat/ChatControllerBase.cpp @@ -65,8 +65,8 @@ void ChatControllerBase::createDayChangeTimer() { if (timerFactory_) { boost::posix_time::ptime now = boost::posix_time::second_clock::local_time(); boost::posix_time::ptime midnight(now.date() + boost::gregorian::days(1)); - long millisecondsUntilMidnight = (midnight - now).total_milliseconds(); - dateChangeTimer_ = boost::shared_ptr(timerFactory_->createTimer(boost::numeric_cast(millisecondsUntilMidnight))); + int millisecondsUntilMidnight = boost::numeric_cast((midnight - now).total_milliseconds()); + dateChangeTimer_ = boost::shared_ptr(timerFactory_->createTimer(millisecondsUntilMidnight)); dateChangeTimer_->onTick.connect(boost::bind(&ChatControllerBase::handleDayChangeTick, this)); dateChangeTimer_->start(); } -- cgit v0.10.2-6-g49f6