Browse Source

Try to improve debug builds a bit

Panagiotis Christopoulos Charitos 6 years ago
parent
commit
a89d289411
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/anki/util/Assert.h

+ 1 - 1
src/anki/util/Assert.h

@@ -23,7 +23,7 @@ void akassert(const char* exprTxt, const char* file, int line, const char* func)
 #	define ANKI_ASSERT(x) \
 #	define ANKI_ASSERT(x) \
 		do \
 		do \
 		{ \
 		{ \
-			if(!(x)) \
+			if(ANKI_UNLIKELY(!(x))) \
 			{ \
 			{ \
 				anki::akassert(#x, ANKI_FILE, __LINE__, ANKI_FUNC); \
 				anki::akassert(#x, ANKI_FILE, __LINE__, ANKI_FUNC); \
 				ANKI_UNREACHABLE(); \
 				ANKI_UNREACHABLE(); \