summaryrefslogtreecommitdiff
path: root/plugins/SmileyAdd/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-10-26 15:58:42 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-10-26 15:58:42 +0300
commitba5a0a06e1ed5b0dc3e330dbb939f13a6651b750 (patch)
treeb600c63b08bb36a1a8a497232b582fe095709057 /plugins/SmileyAdd/src
parent53452cdfd0f64b78eb91d80f2a266ecdcc4953c0 (diff)
faster custom smiley search
Diffstat (limited to 'plugins/SmileyAdd/src')
-rw-r--r--plugins/SmileyAdd/src/customsmiley.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/SmileyAdd/src/customsmiley.h b/plugins/SmileyAdd/src/customsmiley.h
index 65cd87b7cb..e1b8be33f3 100644
--- a/plugins/SmileyAdd/src/customsmiley.h
+++ b/plugins/SmileyAdd/src/customsmiley.h
@@ -29,11 +29,8 @@ public:
class SmileyPackCType
{
- typedef SMOBJLIST<SmileyCType> SmileyVectorType;
- typedef SMOBJLIST<SmileyLookup> SmileyLookupType;
-
- SmileyVectorType m_SmileyList;
- SmileyLookupType m_SmileyLookup;
+ SMOBJLIST<SmileyCType> m_SmileyList;
+ OBJLIST<SmileyLookup> m_SmileyLookup;
ptrA m_szModule;
@@ -41,11 +38,12 @@ class SmileyPackCType
public:
SmileyPackCType(const char *pszModule) :
- m_szModule(mir_strdup(pszModule))
+ m_szModule(mir_strdup(pszModule)),
+ m_SmileyLookup(100, PtrKeySortT)
{}
- SmileyVectorType& GetSmileyList(void) { return m_SmileyList; }
- SmileyLookupType& GetSmileyLookup(void) { return m_SmileyLookup; }
+ auto& GetSmileyList(void) { return m_SmileyList; }
+ auto& GetSmileyLookup(void) { return m_SmileyLookup; }
int SmileyCount(void) const { return m_SmileyList.getCount(); }