Skip to content

Commit

Permalink
Renamed and added some macros
Browse files Browse the repository at this point in the history
  • Loading branch information
Epixu committed Jul 27, 2023
1 parent 965567f commit 14add61
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions source/Core/Config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,23 @@
/// Overhead is unlikely
#ifdef LANGULUS_ENABLE_TESTING
#define LANGULUS_TESTING() 1
#define IF_LANGULUS_TESTING(a) a
#define IF_NOT_LANGULUS_TESTING(a)
#else
#define LANGULUS_TESTING() 0
#endif

#if LANGULUS_TESTING()
#define TESTING(a) a
#else
#define TESTING(a)
#define IF_LANGULUS_TESTING(a)
#define IF_NOT_LANGULUS_TESTING(a) a
#endif

/// Paranoid mode introduces overhead, but zeroes any freed memory
#ifdef LANGULUS_ENABLE_PARANOIA
#define LANGULUS_PARANOID() 1
#define IF_LANGULUS_PARANOID(a) a
#define IF_NOT_LANGULUS_PARANOID(a)
#else
#define LANGULUS_PARANOID() 0
#endif

#if LANGULUS_PARANOID()
#define PARANOIA(a) a
#else
#define PARANOIA(a)
#define IF_LANGULUS_PARANOID(a)
#define IF_NOT_LANGULUS_PARANOID(a) a
#endif

/// Detect debug builds
Expand All @@ -75,12 +71,6 @@
#define DEBUGGERY(a)
#endif

#if LANGULUS_DEBUG()
#define DEBUGGERY(a) a
#else
#define DEBUGGERY(a)
#endif

/// Detect architecture
#if INTPTR_MAX == INT64_MAX
#define LANGULUS_BITNESS() 64
Expand Down

0 comments on commit 14add61

Please sign in to comment.