summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-03-09 17:58:38 +0100
committermadmaxoft <github@xoft.cz>2014-03-09 17:58:38 +0100
commite214bd7666922f1b87eb93d9b844638d848d7f58 (patch)
treefbbb7c2a107f061015d1cffe03e5233a66e0a5b3
parentMerge branch 'master' into PieceGenerator (diff)
parentSilenced useless MSVC warnings in cMetaRotater. (diff)
downloadcuberite-e214bd7666922f1b87eb93d9b844638d848d7f58.tar
cuberite-e214bd7666922f1b87eb93d9b844638d848d7f58.tar.gz
cuberite-e214bd7666922f1b87eb93d9b844638d848d7f58.tar.bz2
cuberite-e214bd7666922f1b87eb93d9b844638d848d7f58.tar.lz
cuberite-e214bd7666922f1b87eb93d9b844638d848d7f58.tar.xz
cuberite-e214bd7666922f1b87eb93d9b844638d848d7f58.tar.zst
cuberite-e214bd7666922f1b87eb93d9b844638d848d7f58.zip
-rw-r--r--src/Blocks/MetaRotater.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Blocks/MetaRotater.h b/src/Blocks/MetaRotater.h
index d3664b6f1..dde88e6db 100644
--- a/src/Blocks/MetaRotater.h
+++ b/src/Blocks/MetaRotater.h
@@ -4,6 +4,15 @@
#pragma once
+// MSVC generates warnings for the templated AssertIfNotMatched parameter conditions, so disable it:
+#ifdef _MSC_VER
+ #pragma warning(disable: 4127) // Conditional expression is constant
+#endif
+
+
+
+
+
/*
Provides a mixin for rotations and reflections following the standard pattern of apply mask then use case.
@@ -29,6 +38,9 @@ public:
};
+
+
+
template<class Base, NIBBLETYPE BitMask, NIBBLETYPE North, NIBBLETYPE East, NIBBLETYPE South, NIBBLETYPE West, bool AssertIfNotMatched>
NIBBLETYPE cMetaRotater<Base, BitMask, North, East, South, West, AssertIfNotMatched>::MetaRotateCW(NIBBLETYPE a_Meta)
{
@@ -49,6 +61,8 @@ NIBBLETYPE cMetaRotater<Base, BitMask, North, East, South, West, AssertIfNotMatc
+
+
template<class Base, NIBBLETYPE BitMask, NIBBLETYPE North, NIBBLETYPE East, NIBBLETYPE South, NIBBLETYPE West, bool AssertIfNotMatched>
NIBBLETYPE cMetaRotater<Base, BitMask, North, East, South, West, AssertIfNotMatched>::MetaRotateCCW(NIBBLETYPE a_Meta)
{
@@ -69,6 +83,8 @@ NIBBLETYPE cMetaRotater<Base, BitMask, North, East, South, West, AssertIfNotMatc
+
+
template<class Base, NIBBLETYPE BitMask, NIBBLETYPE North, NIBBLETYPE East, NIBBLETYPE South, NIBBLETYPE West, bool AssertIfNotMatched>
NIBBLETYPE cMetaRotater<Base, BitMask, North, East, South, West, AssertIfNotMatched>::MetaMirrorXY(NIBBLETYPE a_Meta)
{
@@ -85,6 +101,7 @@ NIBBLETYPE cMetaRotater<Base, BitMask, North, East, South, West, AssertIfNotMatc
+
template<class Base, NIBBLETYPE BitMask, NIBBLETYPE North, NIBBLETYPE East, NIBBLETYPE South, NIBBLETYPE West, bool AssertIfNotMatched>
NIBBLETYPE cMetaRotater<Base, BitMask, North, East, South, West, AssertIfNotMatched>::MetaMirrorYZ(NIBBLETYPE a_Meta)
{
@@ -97,3 +114,7 @@ NIBBLETYPE cMetaRotater<Base, BitMask, North, East, South, West, AssertIfNotMatc
// Not Facing East or West; No change.
return a_Meta;
}
+
+
+
+