diff options
author | madmaxoft <github@xoft.cz> | 2014-09-26 22:53:11 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-09-26 22:53:39 +0200 |
commit | 0d83477540d9eb62c7a4f22f1f5f2b8cd79363ac (patch) | |
tree | 4e7acf1f1d2cc32a9c7bb3cbb0256e379c9175b9 /src/Globals.h | |
parent | Updated Core (diff) | |
download | cuberite-0d83477540d9eb62c7a4f22f1f5f2b8cd79363ac.tar cuberite-0d83477540d9eb62c7a4f22f1f5f2b8cd79363ac.tar.gz cuberite-0d83477540d9eb62c7a4f22f1f5f2b8cd79363ac.tar.bz2 cuberite-0d83477540d9eb62c7a4f22f1f5f2b8cd79363ac.tar.lz cuberite-0d83477540d9eb62c7a4f22f1f5f2b8cd79363ac.tar.xz cuberite-0d83477540d9eb62c7a4f22f1f5f2b8cd79363ac.tar.zst cuberite-0d83477540d9eb62c7a4f22f1f5f2b8cd79363ac.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Globals.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Globals.h b/src/Globals.h index c75c4e99b..0926457da 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -162,8 +162,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 |