mirror of
				https://github.com/gnif/LookingGlass.git
				synced 2025-10-31 12:42:02 +00:00 
			
		
		
		
	[all] common: debug assert should always abort
This commit is contained in:
		| @@ -108,20 +108,13 @@ void printBacktrace(void); | ||||
|  | ||||
| #define DEBUG_ASSERT_PRINT(...) DEBUG_ERROR("Assertion failed: %s", #__VA_ARGS__) | ||||
|  | ||||
| #ifdef NDEBUG | ||||
|   #define DEBUG_ASSERT(...) do { \ | ||||
|     if (!(__VA_ARGS__)) \ | ||||
|       DEBUG_ASSERT_PRINT(__VA_ARGS__); \ | ||||
|   } while (0) | ||||
| #else | ||||
|   #define DEBUG_ASSERT(...) do { \ | ||||
|     if (!(__VA_ARGS__)) \ | ||||
|     { \ | ||||
|       DEBUG_ASSERT_PRINT(__VA_ARGS__); \ | ||||
|       abort(); \ | ||||
|     } \ | ||||
|   } while (0) | ||||
| #endif | ||||
| #define DEBUG_ASSERT(...) do { \ | ||||
|   if (!(__VA_ARGS__)) \ | ||||
|   { \ | ||||
|     DEBUG_ASSERT_PRINT(__VA_ARGS__); \ | ||||
|     abort(); \ | ||||
|   } \ | ||||
| } while (0) | ||||
|  | ||||
| #define DEBUG_UNREACHABLE() DEBUG_FATAL("Unreachable code reached") | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Geoffrey McRae
					Geoffrey McRae