summaryrefslogtreecommitdiff
path: root/indra/llui/llemojidictionary.cpp
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2022-11-08 00:16:58 +0100
committerKitty Barnett <develop@catznip.com>2022-11-08 01:05:01 +0100
commit81dd143d0d901e8e5234cff01fbda246e4621628 (patch)
tree948c765937ce5ebe57bb98115e8d6efa754c60c6 /indra/llui/llemojidictionary.cpp
parentec6c4f102f8b23e0c79dd2c1c0ecbad54f019566 (diff)
[FIXED] Various minor issues
- Typing :+1: doesn't replace the short code with the thumbs-up emoji - Moving the mouse over the emoji complete panel highlights the wrong emoji when mScrollPos > 0 - Emoji complete panel is missing attributes - Crash when attempting to show the tooltip for an emoji text segment - Emoji autocomplete panel can sometimes show empty (type ':cat', select the heart eyed one, Ctrl-Z and then type 2 which should show the emoji for :cat2 but shows an empty square instead)
Diffstat (limited to 'indra/llui/llemojidictionary.cpp')
-rw-r--r--indra/llui/llemojidictionary.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/llui/llemojidictionary.cpp b/indra/llui/llemojidictionary.cpp
index c31638b0bf..b70a9b2e7a 100644
--- a/indra/llui/llemojidictionary.cpp
+++ b/indra/llui/llemojidictionary.cpp
@@ -178,22 +178,22 @@ LLWString LLEmojiDictionary::findMatchingEmojis(const std::string& needle) const
const LLEmojiDescriptor* LLEmojiDictionary::getDescriptorFromShortCode(const std::string& short_code) const
{
const auto it = mShortCode2Descr.find(short_code);
- return (mShortCode2Descr.end() != it) ? &it->second : nullptr;
+ return (mShortCode2Descr.end() != it) ? it->second : nullptr;
}
std::string LLEmojiDictionary::getNameFromEmoji(llwchar ch) const
{
const auto it = mEmoji2Descr.find(ch);
- return (mEmoji2Descr.end() != it) ? it->second.Name : LLStringUtil::null;
+ return (mEmoji2Descr.end() != it) ? it->second->Name : LLStringUtil::null;
}
void LLEmojiDictionary::addEmoji(LLEmojiDescriptor&& descr)
{
mEmojis.push_back(descr);
- mEmoji2Descr.insert(std::make_pair(descr.Character, mEmojis.back()));
+ mEmoji2Descr.insert(std::make_pair(descr.Character, &mEmojis.back()));
for (const std::string& shortCode : descr.ShortCodes)
{
- mShortCode2Descr.insert(std::make_pair(shortCode, mEmojis.back()));
+ mShortCode2Descr.insert(std::make_pair(shortCode, &mEmojis.back()));
}
}