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/newview/llexpandabletextbox.cpp | |
parent | bc50d2c7d57618846a6cb318cd12e006270b64ae (diff) |
Reduce utf8 to wstring conversion and llwstring temporaries during text draw (#2115)
Diffstat (limited to 'indra/newview/llexpandabletextbox.cpp')
-rw-r--r-- | indra/newview/llexpandabletextbox.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 42fe8fc6e6..748e10160c 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -41,7 +41,7 @@ public: : LLTextSegment(start, end), mEditor(editor), mStyle(style), - mExpanderLabel(more_text) + mExpanderLabel(utf8str_to_wstring(more_text)) {} /*virtual*/ bool getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const @@ -80,7 +80,7 @@ public: /*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect) { F32 right_x; - mStyle->getFont()->renderUTF8(mExpanderLabel, start, + mStyle->getFont()->render(mExpanderLabel, start, draw_rect.mRight, draw_rect.mTop, mStyle->getColor(), LLFontGL::RIGHT, LLFontGL::TOP, @@ -103,7 +103,7 @@ public: private: LLTextBase& mEditor; LLStyleSP mStyle; - std::string mExpanderLabel; + LLWString mExpanderLabel; }; LLExpandableTextBox::LLTextBoxEx::Params::Params() |