summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavriliuk <gavriliuk@gmail.com>2023-05-18 07:47:54 +0200
committerGuru <alexandrgproductengine@lindenlab.com>2023-05-18 13:45:34 +0200
commitbb97f3bf03cfa776b09dc2c0929fbb100a11c775 (patch)
treed711a8c308ed13e069c54c41702333233464a87c
parent347c804bfe53b400420e943d9084f088ae7e1c63 (diff)
SL-19575 Create emoji gallery (use ::value_type in LLEmojiDictionary typedefs)
-rw-r--r--indra/llui/llemojidictionary.h6
-rw-r--r--indra/newview/llfloateremojipicker.cpp8
2 files changed, 7 insertions, 7 deletions
diff --git a/indra/llui/llemojidictionary.h b/indra/llui/llemojidictionary.h
index cc26f75ea3..1507ebfad3 100644
--- a/indra/llui/llemojidictionary.h
+++ b/indra/llui/llemojidictionary.h
@@ -57,11 +57,11 @@ class LLEmojiDictionary : public LLParamSingleton<LLEmojiDictionary>, public LLI
public:
typedef std::map<llwchar, const LLEmojiDescriptor*> emoji2descr_map_t;
- typedef std::pair<llwchar, const LLEmojiDescriptor*> emoji2descr_item_t;
+ typedef emoji2descr_map_t::value_type emoji2descr_item_t;
typedef std::map<std::string, const LLEmojiDescriptor*> code2descr_map_t;
- typedef std::pair<std::string, const LLEmojiDescriptor*> code2descr_item_t;
+ typedef code2descr_map_t::value_type code2descr_item_t;
typedef std::map<std::string, std::vector<const LLEmojiDescriptor*>> cat2descrs_map_t;
- typedef std::pair<std::string, std::vector<const LLEmojiDescriptor*>> cat2descrs_item_t;
+ typedef cat2descrs_map_t::value_type cat2descrs_item_t;
static void initClass();
LLWString findMatchingEmojis(const std::string& needle) const;
diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp
index 98fe1e7ca1..7fbaaaaa89 100644
--- a/indra/newview/llfloateremojipicker.cpp
+++ b/indra/newview/llfloateremojipicker.cpp
@@ -123,7 +123,7 @@ BOOL LLFloaterEmojiPicker::postBuild()
mCategory->setCommitCallback([this](LLUICtrl*, const LLSD&) { onCategoryCommit(); });
const LLEmojiDictionary::cat2descrs_map_t& cat2Descrs = LLEmojiDictionary::instance().getCategory2Descrs();
mCategory->clearRows();
- for (const LLEmojiDictionary::cat2descrs_item_t item : cat2Descrs)
+ for (const LLEmojiDictionary::cat2descrs_item_t& item : cat2Descrs)
{
std::string value = item.first;
std::string name = value;
@@ -155,9 +155,9 @@ void LLFloaterEmojiPicker::fillEmojis()
mEmojis->clearRows();
const LLEmojiDictionary::emoji2descr_map_t& emoji2Descr = LLEmojiDictionary::instance().getEmoji2Descr();
- for (const LLEmojiDictionary::emoji2descr_item_t it : emoji2Descr)
+ for (const LLEmojiDictionary::emoji2descr_item_t& item : emoji2Descr)
{
- const LLEmojiDescriptor* descr = it.second;
+ const LLEmojiDescriptor* descr = item.second;
if (!mSelectedCategory.empty() && !matchesCategory(descr))
continue;
@@ -169,7 +169,7 @@ void LLFloaterEmojiPicker::fillEmojis()
// The following line adds default monochrome view of the emoji (is shown as an example)
//params.columns.add().column("look").value(wstring_to_utf8str(LLWString(1, it.first)));
params.columns.add().column("name").value(descr->Name);
- mEmojis->addRow(new LLEmojiScrollListItem(it.first, params), params);
+ mEmojis->addRow(new LLEmojiScrollListItem(item.first, params), params);
}
if (mEmojis->getItemCount())