summaryrefslogtreecommitdiff
path: root/indra/llui/llstatgraph.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-08-13 15:32:47 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-08-13 15:32:47 -0400
commit23f2631d598b6e07450a96ed1ec00670c8867cdd (patch)
tree20195c1688ad8cb7e8631c97fa5920624f10972c /indra/llui/llstatgraph.cpp
parent54334ff6e377e35c97df3a0fe2a859795ec07b21 (diff)
parent8ce3323269d95f54e2b768c4c5aa154d4afbbb6b (diff)
Merge branch 'develop' into nat/edu-channel
Diffstat (limited to 'indra/llui/llstatgraph.cpp')
-rw-r--r--indra/llui/llstatgraph.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp
index bf08055554..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,16 +100,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)