mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 09:37:22 +03:00
Prefer not_reached() over assert(false) where appropriate.
This commit is contained in:
parent
0135fb806e
commit
6556e28be1
5 changed files with 12 additions and 13 deletions
|
|
@ -42,12 +42,6 @@
|
|||
} while (0)
|
||||
#endif
|
||||
|
||||
/* Use to assert a particular configuration, e.g., cassert(config_debug). */
|
||||
#define cassert(c) do { \
|
||||
if ((c) == false) \
|
||||
assert(false); \
|
||||
} while (0)
|
||||
|
||||
#ifndef not_reached
|
||||
#define not_reached() do { \
|
||||
if (config_debug) { \
|
||||
|
|
@ -74,6 +68,12 @@
|
|||
not_implemented(); \
|
||||
} while (0)
|
||||
|
||||
/* Use to assert a particular configuration, e.g., cassert(config_debug). */
|
||||
#define cassert(c) do { \
|
||||
if ((c) == false) \
|
||||
not_reached(); \
|
||||
} while (0)
|
||||
|
||||
#endif /* JEMALLOC_H_TYPES */
|
||||
/******************************************************************************/
|
||||
#ifdef JEMALLOC_H_STRUCTS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue