aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lldebugmessagebox.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:11 -0500
committerJacek Antonelli2008-08-15 23:45:11 -0500
commit215f423cbe18fe9ca14a26caef918d303bad28ff (patch)
tree0743442b286216cc8e19aa487c26f4e9345ffd64 /linden/indra/newview/lldebugmessagebox.cpp
parentSecond Life viewer sources 1.18.3.5-RC (diff)
downloadmeta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.zip
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.gz
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.bz2
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.xz
Second Life viewer sources 1.18.4.0-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/lldebugmessagebox.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/linden/indra/newview/lldebugmessagebox.cpp b/linden/indra/newview/lldebugmessagebox.cpp
index b1f44e9..de185e2 100644
--- a/linden/indra/newview/lldebugmessagebox.cpp
+++ b/linden/indra/newview/lldebugmessagebox.cpp
@@ -2,6 +2,8 @@
2 * @file lldebugmessagebox.cpp 2 * @file lldebugmessagebox.cpp
3 * @brief Implementation of a simple, non-modal message box. 3 * @brief Implementation of a simple, non-modal message box.
4 * 4 *
5 * $LicenseInfo:firstyear=2002&license=viewergpl$
6 *
5 * Copyright (c) 2002-2007, Linden Research, Inc. 7 * Copyright (c) 2002-2007, Linden Research, Inc.
6 * 8 *
7 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
@@ -24,6 +26,7 @@
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE. 28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
27 */ 30 */
28 31
29#include "llviewerprecompiledheaders.h" 32#include "llviewerprecompiledheaders.h"
@@ -215,22 +218,22 @@ void LLDebugVarMessageBox::onClose(bool app_quitting)
215 218
216void LLDebugVarMessageBox::draw() 219void LLDebugVarMessageBox::draw()
217{ 220{
218 char text[128]; /*Flawfinder: ignore*/ 221 LLString text;
219 switch(mVarType) 222 switch(mVarType)
220 { 223 {
221 case VAR_TYPE_F32: 224 case VAR_TYPE_F32:
222 snprintf(text, sizeof(text), "%.3f", *((F32*)mVarData)); /* Flawfinder: ignore */ 225 text = llformat("%.3f", *((F32*)mVarData));
223 break;
224 case VAR_TYPE_S32:
225 snprintf(text, sizeof(text), "%d", *((S32*)mVarData)); /* Flawfinder: ignore */
226 break; 226 break;
227 case VAR_TYPE_VEC3: 227 case VAR_TYPE_S32:
228 { 228 text = llformat("%d", *((S32*)mVarData));
229 LLVector3* vec_p = (LLVector3*)mVarData;
230 snprintf(text, sizeof(text), "%.3f %.3f %.3f", vec_p->mV[VX], vec_p->mV[VY], vec_p->mV[VZ]); /* Flawfinder: ignore */
231 break; 229 break;
232 } 230 case VAR_TYPE_VEC3:
233 default: 231 {
232 LLVector3* vec_p = (LLVector3*)mVarData;
233 text= llformat("%.3f %.3f %.3f", vec_p->mV[VX], vec_p->mV[VY], vec_p->mV[VZ]);
234 break;
235 }
236 default:
234 llwarns << "Unhandled var type " << mVarType << llendl; 237 llwarns << "Unhandled var type " << mVarType << llendl;
235 break; 238 break;
236 } 239 }