From bb97f3bf03cfa776b09dc2c0929fbb100a11c775 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 18 May 2023 07:47:54 +0200 Subject: SL-19575 Create emoji gallery (use ::value_type in LLEmojiDictionary typedefs) --- indra/llui/llemojidictionary.h | 6 +++--- indra/newview/llfloateremojipicker.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'indra') 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, public LLI public: typedef std::map emoji2descr_map_t; - typedef std::pair emoji2descr_item_t; + typedef emoji2descr_map_t::value_type emoji2descr_item_t; typedef std::map code2descr_map_t; - typedef std::pair code2descr_item_t; + typedef code2descr_map_t::value_type code2descr_item_t; typedef std::map> cat2descrs_map_t; - typedef std::pair> 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()) -- cgit v1.2.3