diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-24 06:32:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-24 06:32:08 +0400 |
commit | 27074062ab51a26adf8794732142a36c98eb5204 (patch) | |
tree | 5182437bac6ca4cc0ea15d870dba2b367c318ef8 /intern/ghost/intern/GHOST_Debug.h | |
parent | 9bb030322138dbfee7385e5066146a74cc057268 (diff) |
Formatting edits <120 length lines
Diffstat (limited to 'intern/ghost/intern/GHOST_Debug.h')
-rw-r--r-- | intern/ghost/intern/GHOST_Debug.h | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/intern/ghost/intern/GHOST_Debug.h b/intern/ghost/intern/GHOST_Debug.h index f2e16259c57..38512f6ce2b 100644 --- a/intern/ghost/intern/GHOST_Debug.h +++ b/intern/ghost/intern/GHOST_Debug.h @@ -34,35 +34,42 @@ #define _GHOST_DEBUG_H_ #if defined(WIN32) && !defined(FREE_WINDOWS) - #ifdef DEBUG - #pragma warning (disable:4786) // suppress stl-MSVC debug info warning - // #define GHOST_DEBUG - #endif // DEBUG +# ifdef DEBUG +# pragma warning (disable:4786) // suppress stl-MSVC debug info warning + // #define GHOST_DEBUG +# endif // DEBUG #endif // WIN32 #ifdef WITH_GHOST_DEBUG - #define GHOST_DEBUG // spit ghost events to stdout +# define GHOST_DEBUG // spit ghost events to stdout #endif // WITH_GHOST_DEBUG #ifdef GHOST_DEBUG - #include <iostream> - #include <stdio.h> //for printf() +# include <iostream> +# include <stdio.h> //for printf() #endif // GHOST_DEBUG #ifdef GHOST_DEBUG - #define GHOST_PRINT(x) { std::cout << x; } - #define GHOST_PRINTF(x, ...) { printf(x, __VA_ARGS__); } +# define GHOST_PRINT(x) { std::cout << x; } +# define GHOST_PRINTF(x, ...) { printf(x, __VA_ARGS__); } #else // GHOST_DEBUG - #define GHOST_PRINT(x) - #define GHOST_PRINTF(x, ...) +# define GHOST_PRINT(x) +# define GHOST_PRINTF(x, ...) #endif // GHOST_DEBUG #ifdef GHOST_DEBUG - #define GHOST_ASSERT(x, info) { if (!(x)) {GHOST_PRINT("assertion failed: "); GHOST_PRINT(info); GHOST_PRINT("\n"); } } +# define GHOST_ASSERT(x, info) \ + { \ + if (!(x)) { \ + GHOST_PRINT("assertion failed: "); \ + GHOST_PRINT(info); \ + GHOST_PRINT("\n"); \ + } \ + } #else // GHOST_DEBUG - #define GHOST_ASSERT(x, info) +# define GHOST_ASSERT(x, info) #endif // GHOST_DEBUG #endif // _GHOST_DEBUG_H_ |