From 9fdca96f8bd2211a99fe88e57b70cbecefa20b6d Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 8 Jul 2024 20:27:14 +0200 Subject: Re-enable compiler warnings C4244 and C4396 except for lltracerecording.h and llunittype.h for now --- indra/llui/llstatgraph.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui/llstatgraph.cpp') diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp index d37f927073..95a9493323 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); } } -- cgit v1.2.3 From 604cb4cb4dd71c0f90633e50d5b0108e3901c4ad Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Fri, 26 Jul 2024 06:19:34 -0400 Subject: Reduce utf8 to wstring conversion and llwstring temporaries during text draw (#2115) --- indra/llui/llstatgraph.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'indra/llui/llstatgraph.cpp') 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); } -- cgit v1.2.3 From 874794ea584588457dfde7ef17c447e2a0eb46bb Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Sun, 4 Aug 2024 21:00:10 -0400 Subject: Add LLUIColorTable debug-settings-like floater for easing skin design --- indra/llui/llstatgraph.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui/llstatgraph.cpp') diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp index 28b4d387f1..d97051247e 100644 --- a/indra/llui/llstatgraph.cpp +++ b/indra/llui/llstatgraph.cpp @@ -100,8 +100,8 @@ void LLStatGraph::draw() it--; } - static LLColor4 default_color = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" ); - gGL.color4fv(default_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); -- cgit v1.2.3