From 7c9eb35568a19168d25310ddd73e439d8c6d8ee6 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Sun, 24 Mar 2019 19:43:49 -0400 Subject: [PATCH] We optimized llformat, let's not bother caching version string It would be used less than once per frame, better to save resources. --- indra/newview/llimpanel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 97d9cb4dc..f10ab1dc0 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1364,8 +1364,7 @@ void LLFloaterIMPanel::onSendMsg() if (mSessionType == SUPPORT_SESSION && getChildView("Support Check")->getValue()) { - static const auto version = llformat(" (%d) ", LLVersionInfo::getBuild()); - utf8_text.insert(action ? 3 : 0, action ? version.substr(0, version.size()-1) : version.substr(1)); + utf8_text.insert(action ? 3 : 0, llformat(action ? " (%d)" : "(%d) ", LLVersionInfo::getBuild())); } if ( mSessionInitialized )