diff options
author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-04-25 00:44:25 +0200 |
---|---|---|
committer | Guru <alexandrgproductengine@lindenlab.com> | 2023-04-25 13:14:48 +0200 |
commit | fbf5b199f3bd9775bc992609baf6c093177a70d8 (patch) | |
tree | 82c635aeeb26e173e9816105d12f262041ee0f52 /indra/llui | |
parent | 8fcf691623c21dedd0e478fb8d013a28a2959811 (diff) |
SL-19575 LLFloaterEmojiPicker - code cleanup and layout fixup
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llemojidictionary.h | 3 | ||||
-rw-r--r-- | indra/llui/llview.h | 24 |
2 files changed, 13 insertions, 14 deletions
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<LLEmojiDictionary>, public LLI public: typedef std::map<llwchar, const LLEmojiDescriptor*> emoji2descr_map_t; + typedef std::pair<llwchar, const LLEmojiDescriptor*> emoji2descr_item_t; typedef std::map<std::string, const LLEmojiDescriptor*> code2descr_map_t; + typedef std::pair<std::string, const LLEmojiDescriptor*> 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; 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<std::string> string; Alternative<U32> flags; - Follows(); + Follows(); }; struct Params : public LLInitParam::Block<Params> @@ -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 <class T> T* LLView::getChild(const std::string& name, BOOL recurse) co if (!result) { result = LLUICtrlFactory::getDefaultWidget<T>(name); - - if (result) - { - // *NOTE: You cannot call mFoo = getChild<LLFoo>("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<LLFoo>("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); } } |