From a408bac29378072fbf36864164149458c978cfcc Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:59 -0500 Subject: Second Life viewer sources 1.17.1.0 --- linden/indra/newview/lldebugmessagebox.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'linden/indra/newview/lldebugmessagebox.cpp') diff --git a/linden/indra/newview/lldebugmessagebox.cpp b/linden/indra/newview/lldebugmessagebox.cpp index e238800..948b96a 100644 --- a/linden/indra/newview/lldebugmessagebox.cpp +++ b/linden/indra/newview/lldebugmessagebox.cpp @@ -77,6 +77,9 @@ LLDebugVarMessageBox::LLDebugVarMessageBox(const std::string& title, EDebugVarTy addChild(mSlider2); addChild(mSlider3); break; + default: + llwarns << "Unhandled var type " << var_type << llendl; + break; } mAnimateButton = new LLButton("Animate", LLRect(20, 45, 180, 25), "", onAnimateClicked, this); @@ -185,12 +188,17 @@ void LLDebugVarMessageBox::slider_changed(LLUICtrl* ctrl, void* user_data) *((S32*)msg_box->mVarData) = (S32)msg_box->mSlider1->getValue().asInteger(); break; case VAR_TYPE_VEC3: + { LLVector3* vec_p = (LLVector3*)msg_box->mVarData; vec_p->setVec((F32)msg_box->mSlider1->getValue().asReal(), (F32)msg_box->mSlider2->getValue().asReal(), (F32)msg_box->mSlider3->getValue().asReal()); break; } + default: + llwarns << "Unhandled var type " << msg_box->mVarType << llendl; + break; + } } void LLDebugVarMessageBox::onAnimateClicked(void* user_data) @@ -217,10 +225,15 @@ void LLDebugVarMessageBox::draw() snprintf(text, sizeof(text), "%d", *((S32*)mVarData)); /* Flawfinder: ignore */ break; case VAR_TYPE_VEC3: + { LLVector3* vec_p = (LLVector3*)mVarData; snprintf(text, sizeof(text), "%.3f %.3f %.3f", vec_p->mV[VX], vec_p->mV[VY], vec_p->mV[VZ]); /* Flawfinder: ignore */ break; } + default: + llwarns << "Unhandled var type " << mVarType << llendl; + break; + } mText->setText(text); if(mAnimate) -- cgit v1.1