From 68df6b662de3c38a36b9483c7e3bd7f65f09aefc Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Wed, 17 Jun 2015 15:03:09 -0700 Subject: [PATCH] fix ifdefs around asserts --- libraries/physics/src/MeshMassProperties.cpp | 4 ++-- libraries/shared/src/MatrixStack.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/physics/src/MeshMassProperties.cpp b/libraries/physics/src/MeshMassProperties.cpp index 21ad8a0e1c..d18c068d26 100644 --- a/libraries/physics/src/MeshMassProperties.cpp +++ b/libraries/physics/src/MeshMassProperties.cpp @@ -270,7 +270,7 @@ void MeshMassProperties::computeMassProperties(const VectorOfPoints& points, con } // create some variables to hold temporary results - #ifdef DEBUG + #ifndef NDEBUG uint32_t numPoints = points.size(); #endif 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; for (uint32_t i = 0; i < numTriangles; ++i) { uint32_t t = 3 * i; - #ifdef DEBUG + #ifndef NDEBUG assert(triangleIndices[t] < numPoints); assert(triangleIndices[t + 1] < numPoints); assert(triangleIndices[t + 2] < numPoints); diff --git a/libraries/shared/src/MatrixStack.h b/libraries/shared/src/MatrixStack.h index 0eea14a18a..fdfea2b3cb 100644 --- a/libraries/shared/src/MatrixStack.h +++ b/libraries/shared/src/MatrixStack.h @@ -118,13 +118,13 @@ public: template void withPush(Function f) { - #ifdef DEBUG + #ifndef NDEBUG size_t startingDepth = size(); #endif push(); f(); pop(); - #ifdef DEBUG + #ifndef NDEBUG assert(startingDepth == size()); #endif }