Blender Git Commit Log

Git Commits -> Revision 433fb93

Revision 433fb93 by Jacques Lucke (master)
March 23, 2021, 15:45 (GMT)
BLI: add macro to indicate unreachable code

This adds a `BLI_assert_unreachable()` macro, that should be used instead
of `BLI_assert(false)` in many places.

* `BLI_assert_unreachable` provides more information than `BLI_assert(false)`
to people reading the code.
* `BLI_assert_unreachable` will print an error to `stderr` in a release build.
This makes it more likely that we will get bug reports when the assumptions
of a developer were wrong.

Differential Revision: https://developer.blender.org/D10780

Commit Details:

Full Hash: 433fb9326ece7b0b84f2f548e43059881cca68b5
Parent Commit: 7046e37
Lines Changed: +18, -0

2 Modified Paths:

/source/blender/blenlib/BLI_assert.h (+12, -0) (Diff)
/source/blender/blenlib/intern/BLI_assert.c (+6, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021