summaryrefslogtreecommitdiffstats
path: root/src/Defines.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-06-02 12:51:43 +0200
committerMattes D <github@xoft.cz>2015-06-02 12:51:43 +0200
commit48c153bf53d5606e351bd180e2fd9345034f60aa (patch)
tree060d1b7203b9454eb4c6fbfe086724f383ec6899 /src/Defines.h
parentMerge pull request #2172 from mc-server/LightingCallbacks (diff)
downloadcuberite-48c153bf53d5606e351bd180e2fd9345034f60aa.tar
cuberite-48c153bf53d5606e351bd180e2fd9345034f60aa.tar.gz
cuberite-48c153bf53d5606e351bd180e2fd9345034f60aa.tar.bz2
cuberite-48c153bf53d5606e351bd180e2fd9345034f60aa.tar.lz
cuberite-48c153bf53d5606e351bd180e2fd9345034f60aa.tar.xz
cuberite-48c153bf53d5606e351bd180e2fd9345034f60aa.tar.zst
cuberite-48c153bf53d5606e351bd180e2fd9345034f60aa.zip
Diffstat (limited to 'src/Defines.h')
-rw-r--r--src/Defines.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/Defines.h b/src/Defines.h
index bbc69f79c..4005c84dd 100644
--- a/src/Defines.h
+++ b/src/Defines.h
@@ -245,6 +245,10 @@ inline eBlockFace MirrorBlockFaceY(eBlockFace a_BlockFace)
return a_BlockFace;
};
}
+ #if !defined(__clang__)
+ ASSERT(!"Unknown BLOCK_FACE");
+ return a_BlockFace;
+ #endif
}
@@ -267,6 +271,10 @@ inline eBlockFace RotateBlockFaceCCW(eBlockFace a_BlockFace)
return a_BlockFace;
}
}
+ #if !defined(__clang__)
+ ASSERT(!"Unknown BLOCK_FACE");
+ return a_BlockFace;
+ #endif
}
@@ -288,8 +296,16 @@ inline eBlockFace RotateBlockFaceCW(eBlockFace a_BlockFace)
return a_BlockFace;
};
}
+ #if !defined(__clang__)
+ ASSERT(!"Unknown BLOCK_FACE");
+ return a_BlockFace;
+ #endif
}
+
+
+
+
inline eBlockFace ReverseBlockFace(eBlockFace a_BlockFace)
{
switch (a_BlockFace)
@@ -302,9 +318,16 @@ inline eBlockFace ReverseBlockFace(eBlockFace a_BlockFace)
case BLOCK_FACE_ZM: return BLOCK_FACE_ZP;
case BLOCK_FACE_NONE: return a_BlockFace;
}
+ #if !defined(__clang__)
+ ASSERT(!"Unknown BLOCK_FACE");
+ return a_BlockFace;
+ #endif
}
+
+
+
/** Returns the textual representation of the BlockFace constant. */
inline AString BlockFaceToString(eBlockFace a_BlockFace)
{
@@ -320,7 +343,7 @@ inline AString BlockFaceToString(eBlockFace a_BlockFace)
}
// clang optimisises this line away then warns that it has done so.
#if !defined(__clang__)
- return Printf("Unknown BLOCK_FACE: %d", a_BlockFace);
+ return Printf("Unknown BLOCK_FACE: %d", a_BlockFace);
#endif
}