summaryrefslogtreecommitdiff
path: root/indra/llui/llstatgraph.cpp
diff options
context:
space:
mode:
authornat-goodspeed <nat@lindenlab.com>2024-09-05 15:40:12 -0400
committerGitHub <noreply@github.com>2024-09-05 15:40:12 -0400
commit04568da18d2261f3f7b851cf5341b766c9648204 (patch)
tree83d5db1c173636bb77ebb33e860fac77ab5d79e8 /indra/llui/llstatgraph.cpp
parent18d81e20f0b0044c16615953d7b69d7fb34d3449 (diff)
parentff2d79906ccef217194d5d9ec9d7025db03592a8 (diff)
Merge pull request #2513 from secondlife/lua-merge-dev
Merge develop branch into Lua project branch.
Diffstat (limited to 'indra/llui/llstatgraph.cpp')
-rw-r--r--indra/llui/llstatgraph.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp
index d37f927073..d97051247e 100644
--- a/indra/llui/llstatgraph.cpp
+++ b/indra/llui/llstatgraph.cpp
@@ -70,11 +70,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 +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 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);
- 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);
}