From 9e854b697a06abed2a0917fb6120445f176764f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20N=C3=A6sbye=20Christensen?= Date: Fri, 16 Feb 2024 19:29:51 +0100 Subject: misc: BOOL to bool --- indra/newview/llphysicsmotion.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'indra/newview/llphysicsmotion.cpp') diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 03a02ba26f..98b8919660 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -124,7 +124,7 @@ public: ~LLPhysicsMotion() {} - BOOL onUpdate(F32 time); + bool onUpdate(F32 time); LLPointer getJointState() { @@ -250,9 +250,9 @@ LLPhysicsMotionController::~LLPhysicsMotionController() } } -BOOL LLPhysicsMotionController::onActivate() -{ - return TRUE; +bool LLPhysicsMotionController::onActivate() +{ + return true; } void LLPhysicsMotionController::onDeactivate() @@ -451,16 +451,16 @@ F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local, const return smoothed_acceleration_local; } -BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) +bool LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; // Skip if disabled globally. if (!gSavedSettings.getBOOL("AvatarPhysics")) { - return TRUE; + return true; } - BOOL update_visuals = FALSE; + BOOL update_visuals = false; for (motion_vec_t::iterator iter = mMotions.begin(); iter != mMotions.end(); ++iter) @@ -472,21 +472,21 @@ BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) if (update_visuals) mCharacter->updateVisualParams(); - return TRUE; + return true; } // Return TRUE if character has to update visual params. -BOOL LLPhysicsMotion::onUpdate(F32 time) +bool LLPhysicsMotion::onUpdate(F32 time) { // static FILE *mFileWrite = fopen("c:\\temp\\avatar_data.txt","w"); if (!mParamDriver) - return FALSE; + return false; if (!mLastTime || mLastTime >= time) { mLastTime = time; - return FALSE; + return false; } //////////////////////////////////////////////////////////////////////////////// @@ -499,7 +499,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) if (time_delta > 1.0) { mLastTime = time; - return FALSE; + return false; } // Higher LOD is better. This controls the granularity @@ -507,7 +507,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) const F32 lod_factor = LLVOAvatar::sPhysicsLODFactor; if (lod_factor == 0) { - return TRUE; + return true; } LLJoint *joint = mJointState->getJoint(); @@ -520,7 +520,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) const F32 behavior_drag = getParamValue(DRAG); F32 behavior_maxeffect = getParamValue(MAX_EFFECT); - const BOOL physics_test = FALSE; // Enable this to simulate bouncing on all parts. + const BOOL physics_test = false; // Enable this to simulate bouncing on all parts. if (physics_test) behavior_maxeffect = 1.0f; @@ -548,7 +548,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) // End velocity and acceleration //////////////////////////////////////////////////////////////////////////////// - BOOL update_visuals = FALSE; + bool update_visuals = false; // Break up the physics into a bunch of iterations so that differing framerates will show // roughly the same behavior. -- cgit v1.2.3 From 48b121ab03435507e2ed9a865de9f8aff992877a Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Sat, 17 Feb 2024 14:02:06 +0200 Subject: viewer#826 Follow-up buildfix: update lldatapacker --- indra/newview/llphysicsmotion.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llphysicsmotion.cpp') diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 98b8919660..3ac07626b0 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -460,7 +460,7 @@ bool LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) return true; } - BOOL update_visuals = false; + bool update_visuals = false; for (motion_vec_t::iterator iter = mMotions.begin(); iter != mMotions.end(); ++iter) @@ -707,7 +707,7 @@ bool LLPhysicsMotion::onUpdate(F32 time) const F32 min_delta = (1.0001f-lod_factor)*0.4f; if (llabs(position_diff_local) > min_delta) { - update_visuals = TRUE; + update_visuals = true; mPositionLastUpdate_local = position_new_local; } } -- cgit v1.2.3 From 60d3dd98a44230c21803c1606552ee098ed9fa7c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 21 Feb 2024 21:05:14 +0100 Subject: Convert remaining BOOL to bool --- indra/newview/llphysicsmotion.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'indra/newview/llphysicsmotion.cpp') diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 3ac07626b0..13a272c6d8 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -120,7 +120,7 @@ public: } } - BOOL initialize(); + bool initialize(); ~LLPhysicsMotion() {} @@ -217,20 +217,20 @@ default_controller_map_t initDefaultController() default_controller_map_t LLPhysicsMotion::sDefaultController = initDefaultController(); -BOOL LLPhysicsMotion::initialize() +bool LLPhysicsMotion::initialize() { if (!mJointState->setJoint(mCharacter->getJoint(mJointName.c_str()))) - return FALSE; + return false; mJointState->setUsage(LLJointState::ROT); mParamDriver = (LLViewerVisualParam*)mCharacter->getVisualParam(mParamDriverName.c_str()); if (mParamDriver == NULL) { LL_INFOS() << "Failure reading in [ " << mParamDriverName << " ]" << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } LLPhysicsMotionController::LLPhysicsMotionController(const LLUUID &id) : @@ -282,7 +282,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter controller); if (!motion->initialize()) { - llassert_always(FALSE); + llassert_always(false); return STATUS_FAILURE; } addMotion(motion); @@ -305,7 +305,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter controller); if (!motion->initialize()) { - llassert_always(FALSE); + llassert_always(false); return STATUS_FAILURE; } addMotion(motion); @@ -328,7 +328,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter controller); if (!motion->initialize()) { - llassert_always(FALSE); + llassert_always(false); return STATUS_FAILURE; } addMotion(motion); @@ -350,7 +350,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter controller); if (!motion->initialize()) { - llassert_always(FALSE); + llassert_always(false); return STATUS_FAILURE; } addMotion(motion); @@ -373,7 +373,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter controller); if (!motion->initialize()) { - llassert_always(FALSE); + llassert_always(false); return STATUS_FAILURE; } addMotion(motion); @@ -396,7 +396,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter controller); if (!motion->initialize()) { - llassert_always(FALSE); + llassert_always(false); return STATUS_FAILURE; } addMotion(motion); @@ -475,7 +475,7 @@ bool LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) return true; } -// Return TRUE if character has to update visual params. +// Return true if character has to update visual params. bool LLPhysicsMotion::onUpdate(F32 time) { // static FILE *mFileWrite = fopen("c:\\temp\\avatar_data.txt","w"); @@ -520,7 +520,7 @@ bool LLPhysicsMotion::onUpdate(F32 time) const F32 behavior_drag = getParamValue(DRAG); F32 behavior_maxeffect = getParamValue(MAX_EFFECT); - const BOOL physics_test = false; // Enable this to simulate bouncing on all parts. + const bool physics_test = false; // Enable this to simulate bouncing on all parts. if (physics_test) behavior_maxeffect = 1.0f; @@ -700,7 +700,7 @@ bool LLPhysicsMotion::onUpdate(F32 time) const F32 area_for_this_setting = area_for_max_settings + (area_for_min_settings-area_for_max_settings)*(1.0-lod_factor); const F32 pixel_area = sqrtf(mCharacter->getPixelArea()); - const BOOL is_self = (dynamic_cast(mCharacter) != NULL); + const bool is_self = (dynamic_cast(mCharacter) != NULL); if ((pixel_area > area_for_this_setting) || is_self) { const F32 position_diff_local = llabs(mPositionLastUpdate_local-position_new_local_clamped); -- cgit v1.2.3