diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-10-17 16:56:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-17 16:56:21 +0300 |
commit | 0ef7a9b39cf72da1211039ab22bdf8f9f6a2c984 (patch) | |
tree | 6f51ef179497265b5bff2a355471ae5dc9643ad2 /indra/llui/llstatgraph.cpp | |
parent | 9e24b300d02e5627ea0d304d412cb683ec2de3a4 (diff) | |
parent | d3d349ae0f17a72481f30b9354b9367b1cd3b639 (diff) |
Merge pull request #2856 from secondlife/marchcat/c-develop
Develop → Maint C sync
Diffstat (limited to 'indra/llui/llstatgraph.cpp')
-rw-r--r-- | indra/llui/llstatgraph.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp index bf08055554..0af717d447 100644 --- a/indra/llui/llstatgraph.cpp +++ b/indra/llui/llstatgraph.cpp @@ -36,7 +36,6 @@ #include "llglheaders.h" #include "lltracerecording.h" #include "lltracethreadrecorder.h" -//#include "llviewercontrol.h" /////////////////////////////////////////////////////////////////////////////////// @@ -70,11 +69,11 @@ void LLStatGraph::draw() if (mPerSec) { - mValue = recording.getPerSec(*mNewStatFloatp); + mValue = (F32)recording.getPerSec(*mNewStatFloatp); } else { - mValue = recording.getSum(*mNewStatFloatp); + mValue = (F32)recording.getSum(*mNewStatFloatp); } } @@ -93,8 +92,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,16 +99,15 @@ void LLStatGraph::draw() it--; } - color = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" ); - gGL.color4fv(color.mV); - gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, TRUE); + static LLUIColor default_color = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" ); + gGL.color4fv(default_color.get().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); + gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, false); - color = it->mColor; - gGL.color4fv(color.mV); - gl_rect_2d(1, ll_round(frac*getRect().getHeight()), getRect().getWidth() - 1, 0, TRUE); + gGL.color4fv(it->mColor().mV); + gl_rect_2d(1, ll_round(frac*getRect().getHeight()), getRect().getWidth() - 1, 0, true); } void LLStatGraph::setMin(const F32 min) |