summaryrefslogtreecommitdiffstats
path: root/src/Defines.h
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-05-29 11:08:32 +0200
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-05-29 11:08:32 +0200
commit1e6f02437e88495d57249f742526526ee5865777 (patch)
treeaf200ec3c23c5d04359ba471d275cfa6d0a3c7fb /src/Defines.h
parentMerge pull request #2157 from beeduck/Issue2106 (diff)
parentMerge branch 'master' into PreventNewWarnings (diff)
downloadcuberite-1e6f02437e88495d57249f742526526ee5865777.tar
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.gz
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.bz2
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.lz
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.xz
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.zst
cuberite-1e6f02437e88495d57249f742526526ee5865777.zip
Diffstat (limited to 'src/Defines.h')
-rw-r--r--src/Defines.h39
1 files changed, 27 insertions, 12 deletions
diff --git a/src/Defines.h b/src/Defines.h
index 787eacab8..bbc69f79c 100644
--- a/src/Defines.h
+++ b/src/Defines.h
@@ -238,7 +238,12 @@ inline eBlockFace MirrorBlockFaceY(eBlockFace a_BlockFace)
case BLOCK_FACE_XP: return BLOCK_FACE_XM;
case BLOCK_FACE_ZM: return BLOCK_FACE_ZP;
case BLOCK_FACE_ZP: return BLOCK_FACE_ZM;
- default: return a_BlockFace;
+ case BLOCK_FACE_NONE:
+ case BLOCK_FACE_YM:
+ case BLOCK_FACE_YP:
+ {
+ return a_BlockFace;
+ };
}
}
@@ -255,7 +260,12 @@ inline eBlockFace RotateBlockFaceCCW(eBlockFace a_BlockFace)
case BLOCK_FACE_XP: return BLOCK_FACE_ZM;
case BLOCK_FACE_ZM: return BLOCK_FACE_XM;
case BLOCK_FACE_ZP: return BLOCK_FACE_XP;
- default: return a_BlockFace;
+ case BLOCK_FACE_NONE:
+ case BLOCK_FACE_YM:
+ case BLOCK_FACE_YP:
+ {
+ return a_BlockFace;
+ }
}
}
@@ -271,7 +281,12 @@ inline eBlockFace RotateBlockFaceCW(eBlockFace a_BlockFace)
case BLOCK_FACE_XP: return BLOCK_FACE_ZP;
case BLOCK_FACE_ZM: return BLOCK_FACE_XP;
case BLOCK_FACE_ZP: return BLOCK_FACE_XM;
- default: return a_BlockFace;
+ case BLOCK_FACE_NONE:
+ case BLOCK_FACE_YM:
+ case BLOCK_FACE_YP:
+ {
+ return a_BlockFace;
+ };
}
}
@@ -279,13 +294,13 @@ inline eBlockFace ReverseBlockFace(eBlockFace a_BlockFace)
{
switch (a_BlockFace)
{
- case BLOCK_FACE_YP: return BLOCK_FACE_YM;
- case BLOCK_FACE_XP: return BLOCK_FACE_XM;
- case BLOCK_FACE_ZP: return BLOCK_FACE_ZM;
- case BLOCK_FACE_YM: return BLOCK_FACE_YP;
- case BLOCK_FACE_XM: return BLOCK_FACE_XP;
- case BLOCK_FACE_ZM: return BLOCK_FACE_ZP;
- default: return a_BlockFace;
+ case BLOCK_FACE_YP: return BLOCK_FACE_YM;
+ case BLOCK_FACE_XP: return BLOCK_FACE_XM;
+ case BLOCK_FACE_ZP: return BLOCK_FACE_ZM;
+ case BLOCK_FACE_YM: return BLOCK_FACE_YP;
+ case BLOCK_FACE_XM: return BLOCK_FACE_XP;
+ case BLOCK_FACE_ZM: return BLOCK_FACE_ZP;
+ case BLOCK_FACE_NONE: return a_BlockFace;
}
}
@@ -436,7 +451,7 @@ inline void AddFaceDirection(int & a_BlockX, int & a_BlockY, int & a_BlockZ, eBl
case BLOCK_FACE_ZP: a_BlockZ++; break;
case BLOCK_FACE_XP: a_BlockX++; break;
case BLOCK_FACE_XM: a_BlockX--; break;
- default:
+ case BLOCK_FACE_NONE:
{
LOGWARNING("%s: Unknown face: %d", __FUNCTION__, a_BlockFace);
ASSERT(!"AddFaceDirection(): Unknown face");
@@ -454,7 +469,7 @@ inline void AddFaceDirection(int & a_BlockX, int & a_BlockY, int & a_BlockZ, eBl
case BLOCK_FACE_ZP: a_BlockZ--; break;
case BLOCK_FACE_XP: a_BlockX--; break;
case BLOCK_FACE_XM: a_BlockX++; break;
- default:
+ case BLOCK_FACE_NONE:
{
LOGWARNING("%s: Unknown inv face: %d", __FUNCTION__, a_BlockFace);
ASSERT(!"AddFaceDirection(): Unknown face");