diff --git a/src/hb-config.hh b/src/hb-config.hh index c34d7fbcb..caff9d83e 100644 --- a/src/hb-config.hh +++ b/src/hb-config.hh @@ -40,10 +40,14 @@ #define HB_LEAN #define HB_MINI #define HB_NO_MT +#ifndef NDEBUG +#define NDEBUG +#endif #endif #ifdef HB_LEAN #define HB_DISABLE_DEPRECATED +#define HB_NDEBUG #define HB_NO_ATEXIT #define HB_NO_BUFFER_SERIALIZE #define HB_NO_BITMAP @@ -103,6 +107,12 @@ #define HB_NO_OT_SHAPE_COMPLEX_VOWEL_CONSTRAINTS #endif +#ifdef NDEBUG +#ifndef HB_NDEBUG +#define HB_NDEBUG +#endif +#endif + #ifdef HAVE_CONFIG_OVERRIDE_H #include "config-override.h" diff --git a/src/hb.hh b/src/hb.hh index 47f24af1e..e6d22fe3b 100644 --- a/src/hb.hh +++ b/src/hb.hh @@ -468,16 +468,6 @@ typedef uint64_t hb_vector_size_impl_t; #endif -/* HB_NDEBUG disables some sanity checks that are very safe to disable and - * should be disabled in production systems. If NDEBUG is defined, enable - * HB_NDEBUG; but if it's desirable that normal assert()s (which are very - * light-weight) to be enabled, then HB_DEBUG can be defined to disable - * the costlier checks. */ -#ifdef NDEBUG -#define HB_NDEBUG 1 -#endif - - /* Flags */ /* Enable bitwise ops on enums marked as flags_t */