Hotspot elimination.
This commit is contained in:
@@ -674,17 +674,17 @@ void LLHUDText::reshape()
|
||||
|
||||
F32 LLHUDText::LLHUDTextSegment::getWidth(const LLFontGL* font)
|
||||
{
|
||||
std::map<const LLFontGL*, F32>::iterator iter = mFontWidthMap.find(font);
|
||||
if (iter != mFontWidthMap.end())
|
||||
if (mFontWidthMap[0].first == font)
|
||||
{
|
||||
return iter->second;
|
||||
return mFontWidthMap[0].second;
|
||||
}
|
||||
else
|
||||
else if (mFontWidthMap[1].first == font)
|
||||
{
|
||||
F32 width = font->getWidthF32(mText.c_str());
|
||||
mFontWidthMap[font] = width;
|
||||
return width;
|
||||
return mFontWidthMap[1].second;
|
||||
}
|
||||
F32 width = font->getWidthF32(mText.c_str());
|
||||
mFontWidthMap[mFontWidthMap[0].first != nullptr] = std::make_pair(font, width);
|
||||
return width;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.4.0a) | Added: RLVa-1.0.0f
|
||||
|
||||
Reference in New Issue
Block a user