enforce coding standards

This commit is contained in:
Andrew Meadows 2016-07-12 17:09:33 -07:00
parent 479d90a462
commit e086792eac
2 changed files with 5 additions and 4 deletions

View file

@ -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();

View file

@ -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<DoubleHashKey, ShapeReference> _shapeMap;