diff options
author | Mattes D <github@xoft.cz> | 2015-06-02 14:50:31 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-06-02 14:50:31 +0200 |
commit | 94dc3e19fe36d8256c67716a6cac2fbf369320c8 (patch) | |
tree | 060d1b7203b9454eb4c6fbfe086724f383ec6899 /src/Defines.h | |
parent | Merge pull request #2172 from mc-server/LightingCallbacks (diff) | |
parent | Fixed warnings in MSVC. (diff) | |
download | cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar.gz cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar.bz2 cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar.lz cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar.xz cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.tar.zst cuberite-94dc3e19fe36d8256c67716a6cac2fbf369320c8.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Defines.h | 25 |
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 } |