From fbf5b199f3bd9775bc992609baf6c093177a70d8 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Tue, 25 Apr 2023 00:44:25 +0200 Subject: SL-19575 LLFloaterEmojiPicker - code cleanup and layout fixup --- indra/llui/llemojidictionary.h | 3 +++ indra/llui/llview.h | 24 ++++++++++-------------- 2 files changed, 13 insertions(+), 14 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llemojidictionary.h b/indra/llui/llemojidictionary.h index cbb0ac577d..88ff5b8300 100644 --- a/indra/llui/llemojidictionary.h +++ b/indra/llui/llemojidictionary.h @@ -57,8 +57,11 @@ class LLEmojiDictionary : public LLParamSingleton, public LLI public: typedef std::map emoji2descr_map_t; + typedef std::pair emoji2descr_item_t; typedef std::map code2descr_map_t; + typedef std::pair code2descr_item_t; typedef std::map> cat2descrs_map_t; + typedef std::pair> cat2descrs_item_t; static void initClass(); LLWString findMatchingEmojis(const std::string& needle) const; diff --git a/indra/llui/llview.h b/indra/llui/llview.h index bec45df78a..0add3839bb 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -111,7 +111,7 @@ public: Alternative string; Alternative flags; - Follows(); + Follows(); }; struct Params : public LLInitParam::Block @@ -656,8 +656,8 @@ public: // Draw debug rectangles around widgets to help with alignment and spacing static bool sDebugRects; - static bool sIsRectDirty; - static LLRect sDirtyRect; + static bool sIsRectDirty; + static LLRect sDirtyRect; // Draw widget names and sizes when drawing debug rectangles, turning this // off is useful to make the rectangles themselves easier to see. @@ -700,20 +700,16 @@ template T* LLView::getChild(const std::string& name, BOOL recurse) co if (!result) { result = LLUICtrlFactory::getDefaultWidget(name); - - if (result) - { - // *NOTE: You cannot call mFoo = getChild("bar") - // in a floater or panel constructor. The widgets will not - // be ready. Instead, put it in postBuild(). - LL_WARNS() << "Making dummy " << typeid(T).name() << " named \"" << name << "\" in " << getName() << LL_ENDL; - } - else + if (!result) { - LL_WARNS() << "Failed to create dummy " << typeid(T).name() << LL_ENDL; - return NULL; + LL_ERRS() << "Failed to create dummy " << typeid(T).name() << LL_ENDL; } + // *NOTE: You cannot call mFoo = getChild("bar") + // in a floater or panel constructor. The widgets will not + // be ready. Instead, put it in postBuild(). + LL_WARNS() << "Making dummy " << typeid(T).name() << " named \"" << name << "\" in " << getName() << LL_ENDL; + getDefaultWidgetContainer().addChild(result); } } -- cgit v1.3