mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-05 23:27:38 +02:00
fix ifdefs around asserts
This commit is contained in:
parent
44bb220130
commit
68df6b662d
2 changed files with 4 additions and 4 deletions
|
@ -270,7 +270,7 @@ void MeshMassProperties::computeMassProperties(const VectorOfPoints& points, con
|
||||||
}
|
}
|
||||||
|
|
||||||
// create some variables to hold temporary results
|
// create some variables to hold temporary results
|
||||||
#ifdef DEBUG
|
#ifndef NDEBUG
|
||||||
uint32_t numPoints = points.size();
|
uint32_t numPoints = points.size();
|
||||||
#endif
|
#endif
|
||||||
const btVector3 p0(0.0f, 0.0f, 0.0f);
|
const btVector3 p0(0.0f, 0.0f, 0.0f);
|
||||||
|
@ -283,7 +283,7 @@ void MeshMassProperties::computeMassProperties(const VectorOfPoints& points, con
|
||||||
uint32_t numTriangles = triangleIndices.size() / 3;
|
uint32_t numTriangles = triangleIndices.size() / 3;
|
||||||
for (uint32_t i = 0; i < numTriangles; ++i) {
|
for (uint32_t i = 0; i < numTriangles; ++i) {
|
||||||
uint32_t t = 3 * i;
|
uint32_t t = 3 * i;
|
||||||
#ifdef DEBUG
|
#ifndef NDEBUG
|
||||||
assert(triangleIndices[t] < numPoints);
|
assert(triangleIndices[t] < numPoints);
|
||||||
assert(triangleIndices[t + 1] < numPoints);
|
assert(triangleIndices[t + 1] < numPoints);
|
||||||
assert(triangleIndices[t + 2] < numPoints);
|
assert(triangleIndices[t + 2] < numPoints);
|
||||||
|
|
|
@ -118,13 +118,13 @@ public:
|
||||||
|
|
||||||
template <typename Function>
|
template <typename Function>
|
||||||
void withPush(Function f) {
|
void withPush(Function f) {
|
||||||
#ifdef DEBUG
|
#ifndef NDEBUG
|
||||||
size_t startingDepth = size();
|
size_t startingDepth = size();
|
||||||
#endif
|
#endif
|
||||||
push();
|
push();
|
||||||
f();
|
f();
|
||||||
pop();
|
pop();
|
||||||
#ifdef DEBUG
|
#ifndef NDEBUG
|
||||||
assert(startingDepth == size());
|
assert(startingDepth == size());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue