summaryrefslogtreecommitdiff
path: root/indra/llui/llspellcheck.h
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2024-08-13 18:39:57 -0400
committerRye Mutt <rye@alchemyviewer.org>2024-08-14 00:31:37 -0400
commit2cff1e217ba0df94fc50a30c8d49dc848c294ac6 (patch)
treeb60df9f75e219d3bad7c975b6acd05cd357b1f05 /indra/llui/llspellcheck.h
parentad8dc13150b640ae9613e1edd8cc8c2c72b1e6b2 (diff)
Reduce UI draw stalls from LLSpellChecker singleton via simpleton
Diffstat (limited to 'indra/llui/llspellcheck.h')
-rw-r--r--indra/llui/llspellcheck.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/indra/llui/llspellcheck.h b/indra/llui/llspellcheck.h
index e4d8a12ef1..9df2f94085 100644
--- a/indra/llui/llspellcheck.h
+++ b/indra/llui/llspellcheck.h
@@ -34,12 +34,12 @@
class Hunspell;
-class LLSpellChecker : public LLSingleton<LLSpellChecker>
+class LLSpellChecker : public LLSimpleton<LLSpellChecker>
{
- LLSINGLETON(LLSpellChecker);
+public:
+ LLSpellChecker();
~LLSpellChecker();
-public:
void addToCustomDictionary(const std::string& word);
void addToIgnoreList(const std::string& word);
bool checkSpelling(const std::string& word) const;
@@ -47,7 +47,6 @@ public:
protected:
void addToDictFile(const std::string& dict_path, const std::string& word);
void initHunspell(const std::string& dict_language);
- void initSingleton() override;
public:
typedef std::list<std::string> dict_list_t;
@@ -77,7 +76,7 @@ public:
static boost::signals2::connection setSettingsChangeCallback(const settings_change_signal_t::slot_type& cb);
protected:
- Hunspell* mHunspell;
+ std::unique_ptr<Hunspell> mHunspell;
std::string mDictLanguage;
std::string mDictFile;
dict_list_t mDictSecondary;