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.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llui/lltabcontainer.cpp') diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index f10d545126..0a617558d2 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -1401,7 +1401,7 @@ S32 LLTabContainer::getIndexForPanel(LLPanel* panel) return -1; } -S32 LLTabContainer::getPanelIndexByTitle(const std::string& title) +S32 LLTabContainer::getPanelIndexByTitle(std::string_view title) { for (S32 index = 0 ; index < (S32)mTabList.size(); index++) { @@ -1413,7 +1413,7 @@ S32 LLTabContainer::getPanelIndexByTitle(const std::string& title) return -1; } -LLPanel* LLTabContainer::getPanelByName(const std::string& name) +LLPanel* LLTabContainer::getPanelByName(std::string_view name) { for (S32 index = 0 ; index < (S32)mTabList.size(); index++) { @@ -1637,7 +1637,7 @@ bool LLTabContainer::setTab(S32 which) return is_visible; } -bool LLTabContainer::selectTabByName(const std::string& name) +bool LLTabContainer::selectTabByName(std::string_view name) { LLPanel* panel = getPanelByName(name); if (!panel) -- cgit v1.2.3