From f6916edac458ec6fa507685a8b1d526deac1e6a0 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Fri, 3 May 2019 14:48:10 -0700 Subject: [PATCH] cleanup and removing some accidental C++-20-isms --- interface/src/avatar/AvatarManager.cpp | 4 +--- libraries/entities/src/EntitySimulation.cpp | 16 ---------------- libraries/physics/src/ShapeManager.h | 4 ++-- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/interface/src/avatar/AvatarManager.cpp b/interface/src/avatar/AvatarManager.cpp index 364ba2d5f0..ac74d0ab20 100755 --- a/interface/src/avatar/AvatarManager.cpp +++ b/interface/src/avatar/AvatarManager.cpp @@ -427,8 +427,6 @@ DetailedMotionState* AvatarManager::createDetailedMotionState(OtherAvatarPointer std::vector boundJoints; const btCollisionShape* shape = avatar->createCollisionShape(jointIndex, isBound, boundJoints); if (shape) { - //std::shared_ptr avatar = shared_from_this(); - //std::shared_ptr avatar = getThisPointer(); DetailedMotionState* motionState = new DetailedMotionState(avatar, shape, jointIndex); motionState->setMass(0.0f); // DetailedMotionState has KINEMATIC MotionType, so zero mass is ok motionState->setIsBound(isBound, boundJoints); @@ -514,7 +512,7 @@ void AvatarManager::buildPhysicsTransaction(PhysicsEngine::Transaction& transact if (flags & EASY_DIRTY_PHYSICS_FLAGS) { motionState->handleEasyChanges(flags); } - // NOTE: we don't call detailedMotionState->handleEasyChanges() here is because they are KINEMATIC + // NOTE: we don't call detailedMotionState->handleEasyChanges() here because they are KINEMATIC // and Bullet will automagically call DetailedMotionState::getWorldTransform() on all that are active. if (flags & (Simulation::DIRTY_MOTION_TYPE | Simulation::DIRTY_COLLISION_GROUP)) { diff --git a/libraries/entities/src/EntitySimulation.cpp b/libraries/entities/src/EntitySimulation.cpp index e0a6d7af7c..b5e4fed0fd 100644 --- a/libraries/entities/src/EntitySimulation.cpp +++ b/libraries/entities/src/EntitySimulation.cpp @@ -192,22 +192,6 @@ void EntitySimulation::processChangedEntities() { void EntitySimulation::processChangedEntity(const EntityItemPointer& entity) { uint32_t dirtyFlags = entity->getDirtyFlags(); - /* TODO? maybe add to _entitiesToSort when DIRTY_POSITION is set? - // Although it is not the responsibility of the EntitySimulation to sort the tree for EXTERNAL changes - // it IS responsibile for triggering deletes for entities that leave the bounds of the domain, hence - // we must check for that case here, however we rely on the change event to have set DIRTY_POSITION flag. - if (dirtyFlags & Simulation::DIRTY_POSITION) { - AACube domainBounds(glm::vec3((float)-HALF_TREE_SCALE), (float)TREE_SCALE); - bool success; - AACube newCube = entity->getQueryAACube(success); - if (success && !domainBounds.touches(newCube)) { - qCDebug(entities) << "Entity " << entity->getEntityItemID() << " moved out of domain bounds."; - entity->die(); - prepareEntityForDelete(entity); - return; - } - } - */ if (dirtyFlags & (Simulation::DIRTY_LIFETIME | Simulation::DIRTY_UPDATEABLE)) { if (dirtyFlags & Simulation::DIRTY_LIFETIME) { diff --git a/libraries/physics/src/ShapeManager.h b/libraries/physics/src/ShapeManager.h index b07999ec64..d895ad204e 100644 --- a/libraries/physics/src/ShapeManager.h +++ b/libraries/physics/src/ShapeManager.h @@ -104,8 +104,8 @@ private: ShapeFactory::Worker* _deadWorker { nullptr }; TimePoint _nextOrphanExpiry; uint32_t _ringIndex { 0 }; - std::atomic_uint32_t _workRequestCount { 0 }; - std::atomic_uint32_t _workDeliveryCount { 0 }; + std::atomic_uint _workRequestCount { 0 }; + std::atomic_uint _workDeliveryCount { 0 }; }; #endif // hifi_ShapeManager_h