diff options
author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2024-05-06 16:52:34 +0200 |
---|---|---|
committer | Guru <alexandrgproductengine@lindenlab.com> | 2024-05-07 10:18:51 +0200 |
commit | f9473e8afcb624cc1b101195bf15943ec372b56f (patch) | |
tree | 27a9f85fa0ca8c9dd2138a5522e7a7970a063941 /indra/llprimitive/llprimitive.h | |
parent | 15d4db0b5d52097de33ea036b8a1a4b7f5384e3f (diff) |
secondlife/viewer#1333 BOOL to bool conversion leftovers: ternaries
Diffstat (limited to 'indra/llprimitive/llprimitive.h')
-rw-r--r-- | indra/llprimitive/llprimitive.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h index 45307d567c..1c04e0b595 100644 --- a/indra/llprimitive/llprimitive.h +++ b/indra/llprimitive/llprimitive.h @@ -563,6 +563,7 @@ public: void addFlags(U32 flags) { mMiscFlags |= flags; } void removeFlags(U32 flags) { mMiscFlags &= ~flags; } U32 getFlags() const { return mMiscFlags; } + bool checkFlags(U32 flags) const { return (mMiscFlags & flags) != 0; } static std::string pCodeToString(const LLPCode pcode); static LLPCode legacyToPCode(const U8 legacy); @@ -600,21 +601,19 @@ public: inline bool LLPrimitive::isAvatar() const { - return ( LL_PCODE_LEGACY_AVATAR == mPrimitiveCode ) ? true : false; + return LL_PCODE_LEGACY_AVATAR == mPrimitiveCode; } inline bool LLPrimitive::isSittingAvatar() const { // this is only used server-side - return ( LL_PCODE_LEGACY_AVATAR == mPrimitiveCode - && ((getFlags() & (PRIM_FLAG_SITTING | PRIM_FLAG_SITTING_ON_GROUND)) != 0) ) ? true : false; + return isAvatar() && checkFlags(PRIM_FLAG_SITTING | PRIM_FLAG_SITTING_ON_GROUND); } inline bool LLPrimitive::isSittingAvatarOnGround() const { // this is only used server-side - return ( LL_PCODE_LEGACY_AVATAR == mPrimitiveCode - && ((getFlags() & PRIM_FLAG_SITTING_ON_GROUND) != 0) ) ? true : false; + return isAvatar() && checkFlags(PRIM_FLAG_SITTING_ON_GROUND); } // static |