diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-07-26 06:19:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-26 13:19:34 +0300 |
commit | 604cb4cb4dd71c0f90633e50d5b0108e3901c4ad (patch) | |
tree | 71f6fbbd3278cebceb755c6543268b3cb7ef5d28 /indra/llui/llbadge.cpp | |
parent | bc50d2c7d57618846a6cb318cd12e006270b64ae (diff) |
Reduce utf8 to wstring conversion and llwstring temporaries during text draw (#2115)
Diffstat (limited to 'indra/llui/llbadge.cpp')
-rw-r--r-- | indra/llui/llbadge.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp index 3ff0617554..399f79ad2e 100644 --- a/indra/llui/llbadge.cpp +++ b/indra/llui/llbadge.cpp @@ -231,8 +231,6 @@ void LLBadge::draw() // Calculate badge size based on label text // - LLWString badge_label_wstring = mLabel; - S32 badge_label_begin_offset = 0; S32 badge_char_length = S32_MAX; S32 badge_pixel_length = S32_MAX; @@ -240,7 +238,7 @@ void LLBadge::draw() bool do_not_use_ellipses = false; F32 badge_width = (2.0f * mPaddingHoriz) + - mGLFont->getWidthF32(badge_label_wstring.c_str(), badge_label_begin_offset, badge_char_length); + mGLFont->getWidthF32(mLabel.getWString().c_str(), badge_label_begin_offset, badge_char_length); F32 badge_height = (2.0f * mPaddingVert) + mGLFont->getLineHeight(); @@ -354,7 +352,7 @@ void LLBadge::draw() // Draw the label // - mGLFont->render(badge_label_wstring, + mGLFont->render(mLabel.getWString(), badge_label_begin_offset, badge_center_x + mLabelOffsetHoriz, badge_center_y + mLabelOffsetVert, |