- internal : const-correctness in LLHunspellWrapper

--HG--
branch : Misc-Spellcheck
meow-7.2.2
Kitty Barnett 2010-12-23 21:51:09 +01:00
parent 7f0a348dee
commit 53ea5ca294
2 changed files with 5 additions and 5 deletions

View File

@ -62,14 +62,14 @@ LLHunspellWrapper::~LLHunspellWrapper()
delete m_pHunspell;
}
bool LLHunspellWrapper::checkSpelling(const std::string& strWord)
bool LLHunspellWrapper::checkSpelling(const std::string& strWord) const
{
if ( (!s_fSpellCheck) || (!m_pHunspell) || (strWord.length() < 3) )
return true;
return m_pHunspell->spell(strWord.c_str());
}
S32 LLHunspellWrapper::getSuggestions(const std::string& strWord, std::vector<std::string>& strSuggestionList)
S32 LLHunspellWrapper::getSuggestions(const std::string& strWord, std::vector<std::string>& strSuggestionList) const
{
if ( (!s_fSpellCheck) || (!m_pHunspell) || (strWord.length() < 3) )
return 0;

View File

@ -31,15 +31,15 @@ protected:
~LLHunspellWrapper();
public:
bool checkSpelling(const std::string& strWord);
S32 getSuggestions(const std::string& strWord, std::vector<std::string>& strSuggestionList);
bool checkSpelling(const std::string& strWord) const;
S32 getSuggestions(const std::string& strWord, std::vector<std::string>& strSuggestionList) const;
/*
* Dictionary related functions
*/
const std::string getCurrentDictionary() const { return m_strDictionary; }
S32 getDictionaries(std::vector<std::string>& strDictionaryList) const;
const std::string& getDictionaryPath() { return m_strDictionaryPath; }
const std::string& getDictionaryPath() const { return m_strDictionaryPath; }
S32 getInstalledDictionaries(std::vector<std::string>& strDictionaryList) const;
bool setCurrentDictionary(const std::string& strDictionary);