summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-03-09 17:58:01 +0100
committermadmaxoft <github@xoft.cz>2014-03-09 17:58:01 +0100
commit5c4c147e487e9dc08cfacd156b1f60a485460b75 (patch)
treed1d1afa722cc566b04cdcffdb10b0bcbc369129c /src/Blocks
parentHotfix for MSVC compilation. (diff)
downloadcuberite-5c4c147e487e9dc08cfacd156b1f60a485460b75.tar
cuberite-5c4c147e487e9dc08cfacd156b1f60a485460b75.tar.gz
cuberite-5c4c147e487e9dc08cfacd156b1f60a485460b75.tar.bz2
cuberite-5c4c147e487e9dc08cfacd156b1f60a485460b75.tar.lz
cuberite-5c4c147e487e9dc08cfacd156b1f60a485460b75.tar.xz
cuberite-5c4c147e487e9dc08cfacd156b1f60a485460b75.tar.zst
cuberite-5c4c147e487e9dc08cfacd156b1f60a485460b75.zip
Diffstat (limited to 'src/Blocks')
-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;
}
+
+
+
+