diff options
Diffstat (limited to 'indra/llui/llbadge.cpp')
-rw-r--r-- | indra/llui/llbadge.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp index 3397c97ee1..399f79ad2e 100644 --- a/indra/llui/llbadge.cpp +++ b/indra/llui/llbadge.cpp @@ -36,7 +36,7 @@ static LLDefaultChildRegistry::Register<LLBadge> r("badge"); static const S32 BADGE_OFFSET_NOT_SPECIFIED = 0x7FFFFFFF; // Compiler optimization, generate extern template -template class LLBadge* LLView::getChild<class LLBadge>(const std::string& name, bool recurse) const; +template class LLBadge* LLView::getChild<class LLBadge>(std::string_view name, bool recurse) const; LLBadge::Params::Params() @@ -197,10 +197,10 @@ void renderBadgeBackground(F32 centerX, F32 centerY, F32 width, F32 height, cons F32 x = LLFontGL::sCurOrigin.mX + centerX - width * 0.5f; F32 y = LLFontGL::sCurOrigin.mY + centerY - height * 0.5f; - LLRectf screen_rect(ll_round(x), - ll_round(y), - ll_round(x) + width, - ll_round(y) + height); + LLRectf screen_rect((F32)ll_round(x), + (F32)ll_round(y), + (F32)ll_round(x) + width, + (F32)ll_round(y) + height); LLVector3 vertices[4]; vertices[0] = LLVector3(screen_rect.mRight, screen_rect.mTop, 1.0f); @@ -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(); @@ -302,7 +300,7 @@ void LLBadge::draw() } else { - badge_center_x = location_offset_horiz; + badge_center_x = (F32)location_offset_horiz; } // Compute y position @@ -319,7 +317,7 @@ void LLBadge::draw() } else { - badge_center_y = location_offset_vert; + badge_center_y = (F32)location_offset_vert; } // @@ -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, |