diff options
Diffstat (limited to 'indra/newview/llviewerjointattachment.cpp')
-rw-r--r-- | indra/newview/llviewerjointattachment.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index d7fe28d77c..e733dafcae 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -45,19 +45,19 @@ #include "llglheaders.h" extern LLPipeline gPipeline; -const F32 MAX_ATTACHMENT_DIST = 3.5f; // meters +constexpr F32 MAX_ATTACHMENT_DIST = 3.5f; // meters //----------------------------------------------------------------------------- // LLViewerJointAttachment() //----------------------------------------------------------------------------- LLViewerJointAttachment::LLViewerJointAttachment() : - mVisibleInFirst(FALSE), + mVisibleInFirst(false), mGroup(0), - mIsHUDAttachment(FALSE), + mIsHUDAttachment(false), mPieSlice(-1) { - mValid = FALSE; - mUpdateXform = FALSE; + mValid = false; + mUpdateXform = false; mAttachedObjects.clear(); } @@ -71,15 +71,15 @@ LLViewerJointAttachment::~LLViewerJointAttachment() //----------------------------------------------------------------------------- // isTransparent() //----------------------------------------------------------------------------- -BOOL LLViewerJointAttachment::isTransparent() +bool LLViewerJointAttachment::isTransparent() { - return FALSE; + return false; } //----------------------------------------------------------------------------- // drawShape() //----------------------------------------------------------------------------- -U32 LLViewerJointAttachment::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy ) +U32 LLViewerJointAttachment::drawShape( F32 pixelArea, bool first_pass, bool is_dummy ) { if (LLVOAvatar::sShowAttachmentPoints) { @@ -103,7 +103,7 @@ void LLViewerJointAttachment::setupDrawable(LLViewerObject *object) return; if (object->mDrawable->isActive()) { - object->mDrawable->makeStatic(FALSE); + object->mDrawable->makeStatic(false); } object->mDrawable->mXform.setParent(getXform()); // LLViewerJointAttachment::lazyAttach @@ -162,7 +162,7 @@ void LLViewerJointAttachment::setupDrawable(LLViewerObject *object) //----------------------------------------------------------------------------- // addObject() //----------------------------------------------------------------------------- -BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) +bool LLViewerJointAttachment::addObject(LLViewerObject* object) { object->extractAttachmentItemID(); @@ -184,7 +184,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) // If this happens to be attached to self, then detach. LLVOAvatarSelf::detachAttachmentIntoInventory(object->getAttachmentItemID()); - return FALSE; + return false; } mAttachedObjects.push_back(object); @@ -194,7 +194,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) { if (object->mText.notNull()) { - object->mText->setOnHUDAttachment(TRUE); + object->mText->setOnHUDAttachment(true); } LLViewerObject::const_child_list_t& child_list = object->getChildren(); for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); @@ -203,14 +203,14 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) LLViewerObject* childp = *iter; if (childp && childp->mText.notNull()) { - childp->mText->setOnHUDAttachment(TRUE); + childp->mText->setOnHUDAttachment(true); } } } calcLOD(); - mUpdateXform = TRUE; + mUpdateXform = true; - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -236,7 +236,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object) } // force object visibile - setAttachmentVisibility(TRUE); + setAttachmentVisibility(true); mAttachedObjects.erase(iter); if (object->mDrawable.notNull()) @@ -244,7 +244,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object) //if object is active, make it static if(object->mDrawable->isActive()) { - object->mDrawable->makeStatic(FALSE); + object->mDrawable->makeStatic(false); } LLVector3 cur_position = object->getRenderPosition(); @@ -252,7 +252,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object) object->mDrawable->mXform.setPosition(cur_position); object->mDrawable->mXform.setRotation(cur_rotation); - gPipeline.markMoved(object->mDrawable, TRUE); + gPipeline.markMoved(object->mDrawable, true); gPipeline.markTextured(object->mDrawable); // face may need to change draw pool to/from POOL_HUD if (mIsHUDAttachment) @@ -294,7 +294,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object) { if (object->mText.notNull()) { - object->mText->setOnHUDAttachment(FALSE); + object->mText->setOnHUDAttachment(false); } LLViewerObject::const_child_list_t& child_list = object->getChildren(); for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); @@ -303,13 +303,13 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object) LLViewerObject* childp = *iter; if (childp->mText.notNull()) { - childp->mText->setOnHUDAttachment(FALSE); + childp->mText->setOnHUDAttachment(false); } } } if (mAttachedObjects.size() == 0) { - mUpdateXform = FALSE; + mUpdateXform = false; } object->setAttachmentItemID(LLUUID::null); } @@ -317,7 +317,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object) //----------------------------------------------------------------------------- // setAttachmentVisibility() //----------------------------------------------------------------------------- -void LLViewerJointAttachment::setAttachmentVisibility(BOOL visible) +void LLViewerJointAttachment::setAttachmentVisibility(bool visible) { for (attachedobjs_vec_t::const_iterator iter = mAttachedObjects.begin(); iter != mAttachedObjects.end(); @@ -424,18 +424,18 @@ void LLViewerJointAttachment::calcLOD() //----------------------------------------------------------------------------- // updateLOD() //----------------------------------------------------------------------------- -BOOL LLViewerJointAttachment::updateLOD(F32 pixel_area, BOOL activate) +bool LLViewerJointAttachment::updateLOD(F32 pixel_area, bool activate) { - BOOL res = FALSE; + bool res{ false }; if (!mValid) { - setValid(TRUE, TRUE); - res = TRUE; + setValid(true, true); + res = true; } return res; } -BOOL LLViewerJointAttachment::isObjectAttached(const LLViewerObject *viewer_object) const +bool LLViewerJointAttachment::isObjectAttached(const LLViewerObject *viewer_object) const { for (attachedobjs_vec_t::const_iterator iter = mAttachedObjects.begin(); iter != mAttachedObjects.end(); @@ -444,10 +444,10 @@ BOOL LLViewerJointAttachment::isObjectAttached(const LLViewerObject *viewer_obje const LLViewerObject* attached_object = iter->get(); if (attached_object == viewer_object) { - return TRUE; + return true; } } - return FALSE; + return false; } const LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &object_id) const @@ -462,7 +462,7 @@ const LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &o return attached_object; } } - return NULL; + return nullptr; } LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &object_id) @@ -477,5 +477,5 @@ LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &object_ return attached_object; } } - return NULL; + return nullptr; } |