summaryrefslogtreecommitdiffstats
path: root/Tools/QtBiomeVisualiser/Globals.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-11-18 14:56:32 +0100
committerHowaner <franzi.moos@googlemail.com>2014-11-18 14:56:32 +0100
commit42120e2ea5db0cdb9920ff1c5efef33e0f496d48 (patch)
tree20ba1ae0a53f757cb8814b6cd6a466fe5acf1308 /Tools/QtBiomeVisualiser/Globals.h
parentFixed compile errors. (diff)
parentMerge pull request #1598 from mc-server/SignEditor (diff)
downloadcuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.gz
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.bz2
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.lz
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.xz
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.zst
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.zip
Diffstat (limited to 'Tools/QtBiomeVisualiser/Globals.h')
-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