From e086792eac89af80dd7a48131b1cf1117fb785ca Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Tue, 12 Jul 2016 17:09:33 -0700 Subject: [PATCH] enforce coding standards --- libraries/physics/src/ShapeManager.cpp | 4 ++-- libraries/physics/src/ShapeManager.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libraries/physics/src/ShapeManager.cpp b/libraries/physics/src/ShapeManager.cpp index 4fa660239c..35046adcfd 100644 --- a/libraries/physics/src/ShapeManager.cpp +++ b/libraries/physics/src/ShapeManager.cpp @@ -30,13 +30,13 @@ ShapeManager::~ShapeManager() { btCollisionShape* ShapeManager::getShape(const ShapeInfo& info) { if (info.getType() == SHAPE_TYPE_NONE) { - return NULL; + return nullptr; } const float MIN_SHAPE_DIAGONAL_SQUARED = 3.0e-4f; // 1 cm cube if (4.0f * glm::length2(info.getHalfExtents()) < MIN_SHAPE_DIAGONAL_SQUARED) { // tiny shapes are not supported // qCDebug(physics) << "ShapeManager::getShape -- not making shape due to size" << diagonal; - return NULL; + return nullptr; } DoubleHashKey key = info.getHash(); diff --git a/libraries/physics/src/ShapeManager.h b/libraries/physics/src/ShapeManager.h index 0c411f5f62..cdb2b78789 100644 --- a/libraries/physics/src/ShapeManager.h +++ b/libraries/physics/src/ShapeManager.h @@ -43,11 +43,12 @@ public: private: bool releaseShapeByKey(const DoubleHashKey& key); - struct ShapeReference { + class ShapeReference { + public: int refCount; btCollisionShape* shape; DoubleHashKey key; - ShapeReference() : refCount(0), shape(NULL) {} + ShapeReference() : refCount(0), shape(nullptr) {} }; btHashMap _shapeMap;