From ce1302cd716194255d51c01237eaa429d9acbb51 Mon Sep 17 00:00:00 2001 From: Alexander Gessler Date: Sun, 15 Feb 2015 22:20:34 +0100 Subject: [PATCH] Fix VC12 warning "empty but controlled statement found". --- code/ColladaParser.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/ColladaParser.cpp b/code/ColladaParser.cpp index 9e68c9332..353c50812 100644 --- a/code/ColladaParser.cpp +++ b/code/ColladaParser.cpp @@ -1950,9 +1950,11 @@ void ColladaParser::ReadIndexData( Mesh* pMesh) } } - // small sanity check - if (primType != Prim_TriFans && primType != Prim_TriStrips) - ai_assert(actualPrimitives == numPrimitives); +#ifdef ASSIMP_BUILD_DEBUG + if (primType != Prim_TriFans && primType != Prim_TriStrips) { + ai_assert(actualPrimitives == numPrimitives) + } +#endif // only when we're done reading all

tags (and thus know the final vertex count) can we commit the submesh subgroup.mNumFaces = actualPrimitives;