aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llframestatview.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llframestatview.cpp
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llframestatview.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/linden/indra/newview/llframestatview.cpp b/linden/indra/newview/llframestatview.cpp
index 71d810c..752c6c4 100644
--- a/linden/indra/newview/llframestatview.cpp
+++ b/linden/indra/newview/llframestatview.cpp
@@ -191,7 +191,7 @@ void LLFrameStatView::draw()
191 191
192 // Draw ticks for the "Average bar" 192 // Draw ticks for the "Average bar"
193 F32 tick_value; 193 F32 tick_value;
194 char tick_label[256]; /* Flawfinder: ignore */ 194 std::string tick_label;
195 for (tick_value = 0; tick_value <= 100; tick_value += 10) 195 for (tick_value = 0; tick_value <= 100; tick_value += 10)
196 { 196 {
197 left = 10 + llfloor(tick_value*(total_width/100.f)); 197 left = 10 + llfloor(tick_value*(total_width/100.f));
@@ -208,7 +208,7 @@ void LLFrameStatView::draw()
208 right = left + 1; 208 right = left + 1;
209 gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 1.f, 1.f, 0.2f)); 209 gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 1.f, 1.f, 0.2f));
210 210
211 snprintf(tick_label, sizeof(tick_label), "%.2f", tick_value); /* Flawfinder: ignore */ 211 tick_label = llformat("%.2f", tick_value);
212 // draw labels for the tick marks 212 // draw labels for the tick marks
213 LLFontGL::sMonospace->renderUTF8(tick_label, 0, left, bottom, 213 LLFontGL::sMonospace->renderUTF8(tick_label, 0, left, bottom,
214 LLColor4(1.f, 1.f, 1.f, 0.5f), 214 LLColor4(1.f, 1.f, 1.f, 0.5f),
@@ -258,7 +258,7 @@ void LLFrameStatView::draw()
258 right = left + 1; 258 right = left + 1;
259 gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 1.f, 1.f, 0.25f)); 259 gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 1.f, 1.f, 0.25f));
260 260
261 snprintf(tick_label, sizeof(tick_label), "%.2f", tick_value); /* Flawfinder: ignore */ 261 tick_label = llformat("%.2f", tick_value);
262 // draw labels for the tick marks 262 // draw labels for the tick marks
263 LLFontGL::sMonospace->renderUTF8(tick_label, 0, left, bottom, 263 LLFontGL::sMonospace->renderUTF8(tick_label, 0, left, bottom,
264 LLColor4(1.f, 1.f, 1.f, 0.5f), 264 LLColor4(1.f, 1.f, 1.f, 0.5f),
@@ -283,7 +283,7 @@ void LLFrameStatView::draw()
283 right = left + 1; 283 right = left + 1;
284 gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 1.f, 1.f, 0.25f)); 284 gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 1.f, 1.f, 0.25f));
285 285
286 snprintf(tick_label, sizeof(tick_label), "%.2f", tick_value); /* Flawfinder: ignore */ 286 tick_label = llformat("%.2f", tick_value);
287 // draw labels for the tick marks 287 // draw labels for the tick marks
288 LLFontGL::sMonospace->renderUTF8(tick_label, 0, left, bottom, 288 LLFontGL::sMonospace->renderUTF8(tick_label, 0, left, bottom,
289 LLColor4(1.f, 1.f, 1.f, 0.5f), 289 LLColor4(1.f, 1.f, 1.f, 0.5f),
@@ -368,7 +368,7 @@ void LLFrameStatView::draw()
368 LLView::draw(); 368 LLView::draw();
369} 369}
370 370
371void LLFrameStatView::addStat(LLStat *statp, const char *label, const LLColor4 &color) 371void LLFrameStatView::addStat(LLStat *statp, const std::string& label, const LLColor4 &color)
372{ 372{
373 if( mNumStats >= MAX_STATS ) 373 if( mNumStats >= MAX_STATS )
374 { 374 {