Fix compilation warnings
This commit is contained in:
parent
53ecef10b4
commit
e0c624205c
|
@ -427,7 +427,7 @@ class Map {
|
|||
}
|
||||
|
||||
/// Allocate memory for a given number of elements
|
||||
void reserve(size_t capacity) {
|
||||
void reserve(int capacity) {
|
||||
|
||||
if (capacity <= mCapacity) return;
|
||||
|
||||
|
|
|
@ -97,10 +97,12 @@ class MemoryManager {
|
|||
inline void* MemoryManager::allocate(AllocationType allocationType, size_t size) {
|
||||
|
||||
switch (allocationType) {
|
||||
case AllocationType::Base: return mBaseAllocator->allocate(size); break;
|
||||
case AllocationType::Pool: return mPoolAllocator.allocate(size); break;
|
||||
case AllocationType::Frame: return mSingleFrameAllocator.allocate(size); break;
|
||||
case AllocationType::Base: return mBaseAllocator->allocate(size);
|
||||
case AllocationType::Pool: return mPoolAllocator.allocate(size);
|
||||
case AllocationType::Frame: return mSingleFrameAllocator.allocate(size);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Release previously allocated memory.
|
||||
|
|
|
@ -2518,10 +2518,7 @@ class TestCollisionWorld : public Test {
|
|||
test(collisionData->getNbContactManifolds() == 1);
|
||||
test(collisionData->getTotalNbContactPoints() == 4);
|
||||
|
||||
// True if the bodies are swapped in the collision callback response
|
||||
bool swappedBodiesCollisionData = collisionData->getBody1()->getId() != mBoxBody1->getId();
|
||||
|
||||
for (int i=0; i<collisionData->contactManifolds[0].contactPoints.size(); i++) {
|
||||
for (size_t i=0; i<collisionData->contactManifolds[0].contactPoints.size(); i++) {
|
||||
test(approxEqual(collisionData->contactManifolds[0].contactPoints[i].penetrationDepth, 1.0f));
|
||||
}
|
||||
|
||||
|
@ -2538,10 +2535,7 @@ class TestCollisionWorld : public Test {
|
|||
test(collisionData->getNbContactManifolds() == 1);
|
||||
test(collisionData->getTotalNbContactPoints() == 4);
|
||||
|
||||
// True if the bodies are swapped in the collision callback response
|
||||
swappedBodiesCollisionData = collisionData->getBody1()->getId() != mBoxBody1->getId();
|
||||
|
||||
for (int i=0; i<collisionData->contactManifolds[0].contactPoints.size(); i++) {
|
||||
for (size_t i=0; i<collisionData->contactManifolds[0].contactPoints.size(); i++) {
|
||||
test(approxEqual(collisionData->contactManifolds[0].contactPoints[i].penetrationDepth, 1.0f));
|
||||
}
|
||||
|
||||
|
@ -2558,10 +2552,7 @@ class TestCollisionWorld : public Test {
|
|||
test(collisionData->getNbContactManifolds() == 1);
|
||||
test(collisionData->getTotalNbContactPoints() == 4);
|
||||
|
||||
// True if the bodies are swapped in the collision callback response
|
||||
swappedBodiesCollisionData = collisionData->getBody1()->getId() != mBoxBody1->getId();
|
||||
|
||||
for (int i=0; i<collisionData->contactManifolds[0].contactPoints.size(); i++) {
|
||||
for (size_t i=0; i<collisionData->contactManifolds[0].contactPoints.size(); i++) {
|
||||
test(approxEqual(collisionData->contactManifolds[0].contactPoints[i].penetrationDepth, 1.0f));
|
||||
}
|
||||
|
||||
|
@ -2578,11 +2569,8 @@ class TestCollisionWorld : public Test {
|
|||
test(collisionData->getNbContactManifolds() == 1);
|
||||
test(collisionData->getTotalNbContactPoints() == 4);
|
||||
|
||||
// True if the bodies are swapped in the collision callback response
|
||||
swappedBodiesCollisionData = collisionData->getBody1()->getId() != mBoxBody1->getId();
|
||||
|
||||
// Test contact points
|
||||
for (int i=0; i<collisionData->contactManifolds[0].contactPoints.size(); i++) {
|
||||
for (size_t i=0; i<collisionData->contactManifolds[0].contactPoints.size(); i++) {
|
||||
test(approxEqual(collisionData->contactManifolds[0].contactPoints[i].penetrationDepth, 1.0f));
|
||||
}
|
||||
|
||||
|
@ -2652,10 +2640,7 @@ class TestCollisionWorld : public Test {
|
|||
test(collisionData->getNbContactManifolds() == 1);
|
||||
test(collisionData->getTotalNbContactPoints() == 4);
|
||||
|
||||
// True if the bodies are swapped in the collision callback response
|
||||
swappedBodiesCollisionData = collisionData->getBody1()->getId() != mConvexMeshBody1->getId();
|
||||
|
||||
for (int i=0; i<collisionData->contactManifolds[0].contactPoints.size(); i++) {
|
||||
for (size_t i=0; i<collisionData->contactManifolds[0].contactPoints.size(); i++) {
|
||||
test(approxEqual(collisionData->contactManifolds[0].contactPoints[i].penetrationDepth, 1.0f));
|
||||
}
|
||||
|
||||
|
@ -2672,10 +2657,7 @@ class TestCollisionWorld : public Test {
|
|||
test(collisionData->getNbContactManifolds() == 1);
|
||||
test(collisionData->getTotalNbContactPoints() == 4);
|
||||
|
||||
// True if the bodies are swapped in the collision callback response
|
||||
swappedBodiesCollisionData = collisionData->getBody1()->getId() != mConvexMeshBody1->getId();
|
||||
|
||||
for (int i=0; i<collisionData->contactManifolds[0].contactPoints.size(); i++) {
|
||||
for (size_t i=0; i<collisionData->contactManifolds[0].contactPoints.size(); i++) {
|
||||
test(approxEqual(collisionData->contactManifolds[0].contactPoints[i].penetrationDepth, 1.0f));
|
||||
}
|
||||
|
||||
|
@ -2692,11 +2674,8 @@ class TestCollisionWorld : public Test {
|
|||
test(collisionData->getNbContactManifolds() == 1);
|
||||
test(collisionData->getTotalNbContactPoints() == 4);
|
||||
|
||||
// True if the bodies are swapped in the collision callback response
|
||||
swappedBodiesCollisionData = collisionData->getBody1()->getId() != mConvexMeshBody1->getId();
|
||||
|
||||
// Test contact points
|
||||
for (int i=0; i<collisionData->contactManifolds[0].contactPoints.size(); i++) {
|
||||
for (size_t i=0; i<collisionData->contactManifolds[0].contactPoints.size(); i++) {
|
||||
test(approxEqual(collisionData->contactManifolds[0].contactPoints[i].penetrationDepth, 1.0f));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user