summaryrefslogtreecommitdiff
path: root/include/util
diff options
context:
space:
mode:
Diffstat (limited to 'include/util')
-rw-r--r--include/util/Noreturn.hpp2
-rw-r--r--include/util/Unused.hpp12
2 files changed, 13 insertions, 1 deletions
diff --git a/include/util/Noreturn.hpp b/include/util/Noreturn.hpp
index 9f9862c..a3e3004 100644
--- a/include/util/Noreturn.hpp
+++ b/include/util/Noreturn.hpp
@@ -1,7 +1,7 @@
#ifndef __NORETURN_H_
#define __NORETURN_H
-#ifdef __GNUC__
+#if defined( __GNUC__ )
#define CRAWLER_NORETURN __attribute__((noreturn))
#else
#define CRAWLER_NORETURN
diff --git a/include/util/Unused.hpp b/include/util/Unused.hpp
new file mode 100644
index 0000000..e04a8cf
--- /dev/null
+++ b/include/util/Unused.hpp
@@ -0,0 +1,12 @@
+#ifndef __UNUSED_H
+#define __UNUSED_H
+
+#if defined( __GNUC__ )
+#define CRAWLER_UNUSED( x ) x __attribute__( ( unused ) )
+#elif defined( __MSVC__ )
+#define CRAWLER_UNUSED( x ) __pragma( warning( suppress: 4100 4101 ) ) x
+#else
+#define CRAWLER_UNUSED( x ) x
+#endif
+
+#endif