From 169bc5f62b1098aabc7fd07cc5fb82d5f2c2b4ba Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 5 Feb 2015 20:35:25 +1100 Subject: [PATCH] debug: move maths header inc to avoid circular dep --- debug.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/debug.hpp b/debug.hpp index 89510982..b0a260e2 100644 --- a/debug.hpp +++ b/debug.hpp @@ -20,8 +20,7 @@ #ifndef __DEBUG_HPP #define __DEBUG_HPP -#include "maths.hpp" - +//#include "maths.hpp" // XXX: See notes at the end of file for maths.hpp inclusion #include #include #include @@ -269,4 +268,11 @@ namespace debug { void init (void); } + +/////////////////////////////////////////////////////////////////////////////// +// XXX: maths needs to be included so that CHECK_EQ/NEQ can call almost_equal, +// but maths.hpp might be using CHECK_ macros so we must include maths.hpp +// after we define the CHECK_ macros so the preprocessor can resolve them. +#include "maths.hpp" + #endif // __DEBUG_HPP