Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/BLI_assert.h
| Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | |||||
| /** | /** | ||||
| * Indicates that this line of code should never be executed. If it is reached, it will abort in | * Indicates that this line of code should never be executed. If it is reached, it will abort in | ||||
| * debug builds and print an error in release builds. | * debug builds and print an error in release builds. | ||||
| */ | */ | ||||
| #define BLI_assert_unreachable() \ | #define BLI_assert_unreachable() \ | ||||
| { \ | { \ | ||||
| _BLI_assert_unreachable_print(__FILE__, __LINE__, __func__); \ | _BLI_assert_unreachable_print(__FILE__, __LINE__, __func__); \ | ||||
| BLI_assert(!"This line of code is marked to be unreachable."); \ | BLI_assert_msg(0, "This line of code is marked to be unreachable."); \ | ||||
| } \ | } \ | ||||
| ((void)0) | ((void)0) | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||