diff options
author | Nicky <nicky.dasmijn@posteo.nl> | 2024-08-03 14:30:06 +0200 |
---|---|---|
committer | Nicky <nicky.dasmijn@posteo.nl> | 2024-08-03 14:30:06 +0200 |
commit | 04c47b95323a8022785e58fec03c14769ddfa6af (patch) | |
tree | 2e781e03d8af6bc231f9340b1e289234c363ff20 /indra/llui/llstatgraph.cpp | |
parent | f480075e1ffbcc026843a3d14fd6533aad1e7126 (diff) | |
parent | 2ee039c736f64c91bb4f16e403360cddb0089707 (diff) |
Merge remote-tracking branch 'll/marchcat/b-develop' into feature/warning_cleansweep
Diffstat (limited to 'indra/llui/llstatgraph.cpp')
-rw-r--r-- | indra/llui/llstatgraph.cpp | 9 |
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); } |