Ensure asserts are defined where expected.
parent
7b7764afb9
commit
51150cb3df
|
@ -168,7 +168,6 @@ void ArmaturePopulate::BuildBoneStack(aiNode *,
|
||||||
const std::vector<aiBone *> &bones,
|
const std::vector<aiBone *> &bones,
|
||||||
std::map<aiBone *, aiNode *> &bone_stack,
|
std::map<aiBone *, aiNode *> &bone_stack,
|
||||||
std::vector<aiNode *> &node_stack) {
|
std::vector<aiNode *> &node_stack) {
|
||||||
ai_assert(scene);
|
|
||||||
ai_assert(root_node);
|
ai_assert(root_node);
|
||||||
ai_assert(!node_stack.empty());
|
ai_assert(!node_stack.empty());
|
||||||
|
|
||||||
|
|
|
@ -42,12 +42,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef AI_ASSERT_H_INC
|
#ifndef AI_ASSERT_H_INC
|
||||||
#define AI_ASSERT_H_INC
|
#define AI_ASSERT_H_INC
|
||||||
|
|
||||||
|
#include <assimp/defs.h>
|
||||||
|
|
||||||
#if defined(ASSIMP_BUILD_DEBUG)
|
#if defined(ASSIMP_BUILD_DEBUG)
|
||||||
|
|
||||||
namespace Assimp
|
namespace Assimp
|
||||||
{
|
{
|
||||||
// Assert violation behavior can be customized: see AssertHandler.h.
|
// Assert violation behavior can be customized: see AssertHandler.h.
|
||||||
void aiAssertViolation(const char* failedExpression, const char* file, int line);
|
ASSIMP_API void aiAssertViolation(const char* failedExpression, const char* file, int line);
|
||||||
}
|
}
|
||||||
|
|
||||||
# define ai_assert(expression) (void)((!!(expression)) || (Assimp::aiAssertViolation(#expression, __FILE__, __LINE__), 0))
|
# define ai_assert(expression) (void)((!!(expression)) || (Assimp::aiAssertViolation(#expression, __FILE__, __LINE__), 0))
|
||||||
|
|
Loading…
Reference in New Issue