]> git.sesse.net Git - movit/commitdiff
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 78845094196ccb92ea59df679f05c8f0179c7a59..ecdd95a455320ed9625e170752b39967a1495c4c 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 e12c2c422e114f72c5e2739af2a94a8fec575688..79b5987ae05a329691ba73f546390c7a0f364c11 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)