From 2d043af6a04518a3da12ec89fc9682b2ab828ddc Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 4 Nov 2021 21:39:44 -0400
Subject: [PATCH] Experimental button draw opt to remove a string copy

---
 indra/llui/llbutton.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index a92045a01de..05b31e1eaf8 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -801,7 +801,7 @@ void LLButton::draw()
 		label_color = ll::ui::SearchableControl::getHighlightColor();
 
 	// Unselected label assignments
-	LLWString label = getCurrentLabel();
+	const LLWString& label = getCurrentLabel().getWString();
 
 	// overlay with keyboard focus border
 	if (hasFocus())
@@ -933,7 +933,7 @@ void LLButton::draw()
 	// Draw label
 	if( !label.empty() )
 	{
-		LLWStringUtil::trim(label);
+		//LLWStringUtil::trim(label);
 
 		S32 x;
 		switch( mHAlign )
-- 
GitLab