summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-09-27 22:26:56 +0200
committermadmaxoft <github@xoft.cz>2014-09-27 22:26:56 +0200
commit576d088f38564c796277659669551494bb55d6cc (patch)
treeee0e69e6bf78641c2be91fed93565b8cf4547551 /Tools
parentFixed another redstone crash. (diff)
downloadcuberite-576d088f38564c796277659669551494bb55d6cc.tar
cuberite-576d088f38564c796277659669551494bb55d6cc.tar.gz
cuberite-576d088f38564c796277659669551494bb55d6cc.tar.bz2
cuberite-576d088f38564c796277659669551494bb55d6cc.tar.lz
cuberite-576d088f38564c796277659669551494bb55d6cc.tar.xz
cuberite-576d088f38564c796277659669551494bb55d6cc.tar.zst
cuberite-576d088f38564c796277659669551494bb55d6cc.zip
Diffstat (limited to 'Tools')
-rw-r--r--Tools/QtBiomeVisualiser/Globals.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/Tools/QtBiomeVisualiser/Globals.h b/Tools/QtBiomeVisualiser/Globals.h
index 8d2e913b7..e2e9a9970 100644
--- a/Tools/QtBiomeVisualiser/Globals.h
+++ b/Tools/QtBiomeVisualiser/Globals.h
@@ -158,8 +158,17 @@ template class SizeChecker<UInt16, 2>;
TypeName(const TypeName &); \
void operator =(const TypeName &)
+// A macro that is used to mark unused local variables, to avoid pedantic warnings in gcc / clang / MSVC
+// Note that in MSVC it requires the full type of X to be known
+#define UNUSED_VAR(X) (void)(X)
+
// A macro that is used to mark unused function parameters, to avoid pedantic warnings in gcc
-#define UNUSED(X) (void)(X)
+// Written so that the full type of param needn't be known
+#ifdef _MSC_VER
+ #define UNUSED(X)
+#else
+ #define UNUSED UNUSED_VAR
+#endif