diff options
Diffstat (limited to 'src/Blocks')
-rw-r--r-- | src/Blocks/BlockLeaves.h | 16 | ||||
-rw-r--r-- | src/Blocks/BlockTorch.h | 2 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/Blocks/BlockLeaves.h b/src/Blocks/BlockLeaves.h index 0d7500491..c1840c474 100644 --- a/src/Blocks/BlockLeaves.h +++ b/src/Blocks/BlockLeaves.h @@ -11,13 +11,15 @@ #define LEAVES_CHECK_DISTANCE 6 #define PROCESS_NEIGHBOR(x, y, z) \ - switch (a_Area.GetBlockType(x, y, z)) \ - { \ - case E_BLOCK_LEAVES: a_Area.SetBlockType(x, y, z, static_cast<BLOCKTYPE>(E_BLOCK_SPONGE + i + 1)); break; \ - case E_BLOCK_LOG: return true; \ - case E_BLOCK_NEW_LEAVES: a_Area.SetBlockType(x, y, z, static_cast<BLOCKTYPE>(E_BLOCK_SPONGE + i + 1)); break; \ - case E_BLOCK_NEW_LOG: return true; \ - } + do { \ + switch (a_Area.GetBlockType(x, y, z)) \ + { \ + case E_BLOCK_LEAVES: a_Area.SetBlockType(x, y, z, static_cast<BLOCKTYPE>(E_BLOCK_SPONGE + i + 1)); break; \ + case E_BLOCK_LOG: return true; \ + case E_BLOCK_NEW_LEAVES: a_Area.SetBlockType(x, y, z, static_cast<BLOCKTYPE>(E_BLOCK_SPONGE + i + 1)); break; \ + case E_BLOCK_NEW_LOG: return true; \ + } \ + } while (false) bool HasNearLog(cBlockArea &a_Area, int a_BlockX, int a_BlockY, int a_BlockZ); diff --git a/src/Blocks/BlockTorch.h b/src/Blocks/BlockTorch.h index 8d1363a16..8f95fa344 100644 --- a/src/Blocks/BlockTorch.h +++ b/src/Blocks/BlockTorch.h @@ -62,7 +62,7 @@ public: ASSERT(!"Unhandled torch direction!"); break; } - }; + } return 0x0; } |