From e834e77988fcf637ee0f3e4c5c0875e47044e324 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 1 Jul 2024 21:48:34 -0400 Subject: Reduce string temporaries from findChild and getChild --- indra/llui/lltabcontainer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui/lltabcontainer.h') diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index b22eec2fe5..4f0a0b2a57 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -149,8 +149,8 @@ public: /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType type, void* cargo_data, EAcceptance* accept, std::string& tooltip); - /*virtual*/ LLView* getChildView(const std::string& name, bool recurse = true) const; - /*virtual*/ LLView* findChildView(const std::string& name, bool recurse = true) const; + /*virtual*/ LLView* getChildView(std::string_view name, bool recurse = true) const; + /*virtual*/ LLView* findChildView(std::string_view name, bool recurse = true) const; /*virtual*/ void initFromParams(const LLPanel::Params& p); /*virtual*/ bool addChild(LLView* view, S32 tab_group = 0); /*virtual*/ bool postBuild(); -- cgit v1.2.3 From 14cbf331cbf345bac83606ee5f56c994694420b3 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Tue, 2 Jul 2024 08:56:42 -0400 Subject: Reduce string temporaries from LLTabContainer, LLMenuGL, LLLayoutStack, and LLKeywords using string_view --- indra/llui/lltabcontainer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llui/lltabcontainer.h') diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index 4f0a0b2a57..40f272ffa8 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -190,8 +190,8 @@ public: S32 getTabCount(); LLPanel* getPanelByIndex(S32 index); S32 getIndexForPanel(LLPanel* panel); - S32 getPanelIndexByTitle(const std::string& title); - LLPanel* getPanelByName(const std::string& name); + S32 getPanelIndexByTitle(std::string_view title); + LLPanel* getPanelByName(std::string_view name); S32 getTotalTabWidth() const; void setCurrentTabName(const std::string& name); @@ -201,7 +201,7 @@ public: void selectPrevTab(); bool selectTabPanel( LLPanel* child ); bool selectTab(S32 which); - bool selectTabByName(const std::string& title); + bool selectTabByName(std::string_view title); void setCurrentPanelIndex(S32 index) { mCurrentTabIdx = index; } bool getTabPanelFlashing(LLPanel* child); -- cgit v1.2.3