Factor CHECKED out of DEBUG so it can be set seperatly

Suggested-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2017-02-19 12:49:45 +01:00
parent 2ac6eedac5
commit e8d4eacc07
2 changed files with 5 additions and 1 deletions

View File

@ -45,7 +45,7 @@
// For debuging we use signed operations so overflows can be detected (by ubsan)
// For production we use unsigned so there are no undefined operations
#ifdef DEBUG
#ifdef CHECKED
#define SUINT int
#else
#define SUINT unsigned

View File

@ -30,6 +30,10 @@
# define NDEBUG
#endif
#if defined(DEBUG) && !defined(CHECKED)
# define CHECKED
#endif
#include <limits.h>
#include <stdint.h>
#include <stddef.h>