diff options
Diffstat (limited to 'indra/newview/lldebugmessagebox.cpp')
-rw-r--r-- | indra/newview/lldebugmessagebox.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/lldebugmessagebox.cpp b/indra/newview/lldebugmessagebox.cpp index 938a6ebd11..c62459f461 100644 --- a/indra/newview/lldebugmessagebox.cpp +++ b/indra/newview/lldebugmessagebox.cpp @@ -57,6 +57,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); @@ -165,12 +168,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) @@ -197,10 +205,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) |