mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
enforce coding standards
This commit is contained in:
parent
479d90a462
commit
e086792eac
2 changed files with 5 additions and 4 deletions
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue