summaryrefslogtreecommitdiff
path: root/indra/llui/llstatgraph.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-07-27 19:37:18 +0300
committerGitHub <noreply@github.com>2024-07-27 19:37:18 +0300
commit0a6f28209e2be86462428a6f779b465e3604e831 (patch)
treeb968655ced36ef127b028819e9edb509861a76ca /indra/llui/llstatgraph.cpp
parente008b44fd88be83426812e67707896e970947c49 (diff)
parent817bc25b2732dc23295e6a7ac0da5ad142e33434 (diff)
Merge branch 'develop' into marchcat/b-develop
Diffstat (limited to 'indra/llui/llstatgraph.cpp')
-rw-r--r--indra/llui/llstatgraph.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp
index 95a9493323..28b4d387f1 100644
--- a/indra/llui/llstatgraph.cpp
+++ b/indra/llui/llstatgraph.cpp
@@ -93,8 +93,6 @@ void LLStatGraph::draw()
mUpdateTimer.reset();
}
- LLColor4 color;
-
threshold_vec_t::iterator it = std::lower_bound(mThresholds.begin(), mThresholds.end(), Threshold(mValue / mMax, LLUIColor()));
if (it != mThresholds.begin())
@@ -102,15 +100,14 @@ void LLStatGraph::draw()
it--;
}
- color = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" );
- gGL.color4fv(color.mV);
+ static LLColor4 default_color = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" );
+ gGL.color4fv(default_color.mV);
gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, true);
gGL.color4fv(LLColor4::black.mV);
gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, false);
- color = it->mColor;
- gGL.color4fv(color.mV);
+ gGL.color4fv(it->mColor().mV);
gl_rect_2d(1, ll_round(frac*getRect().getHeight()), getRect().getWidth() - 1, 0, true);
}