Make util.h private to the effects; instead, defs.h contains what effect.h needs...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 3 Feb 2013 14:17:39 +0000 (15:17 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 3 Feb 2013 14:17:39 +0000 (15:17 +0100)
defs.h [new file with mode: 0644]
effect.h
util.h

diff --git a/defs.h b/defs.h
new file mode 100644 (file)
index 0000000..fc4fa92
--- /dev/null
+++ b/defs.h
@@ -0,0 +1,12 @@
+#ifndef _MOVIT_DEFS_H
+#define _MOVIT_DEFS_H
+
+// Utility macros that are useful from other heder files.
+
+#ifdef __GNUC__
+#define MUST_CHECK_RESULT __attribute__((warn_unused_result))
+#else
+#define MUST_CHECK_RESULT 
+#endif
+
+#endif  // !defined(_MOVIT_DEFS_H)
index 7884509..ecdd95a 100644 (file)
--- a/effect.h
+++ b/effect.h
@@ -16,7 +16,7 @@
 #include <map>
 #include <string>
 
-#include "util.h"
+#include "defs.h"
 
 class EffectChain;
 class Node;
diff --git a/util.h b/util.h
index e12c2c4..79b5987 100644 (file)
--- a/util.h
+++ b/util.h
@@ -47,12 +47,6 @@ void combine_two_samples(float w1, float w2, float *offset, float *total_weight,
 #define check_error() { int err = glGetError(); if (err != GL_NO_ERROR) { printf("GL error 0x%x at %s:%d\n", err, __FILE__, __LINE__); exit(1); } }
 #endif
 
-#ifdef __GNUC__
-#define MUST_CHECK_RESULT __attribute__((warn_unused_result))
-#else
-#define MUST_CHECK_RESULT 
-#endif
-
 // CHECK() is like assert(), but retains any side effects no matter the compilation mode.
 #ifdef NDEBUG
 #define CHECK(x) (void)(x)