From a9031b6bae742b333b1b390192fa590f2ecb07ea Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Mon, 5 Oct 2020 11:27:14 +0100 Subject: Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963) * Fix cmake not adding Werror on clang, and _lots_ of warnings * WIP: Build fixes * Cannot make intermediate blockhandler instance * Tiger's changes * Fix BitIndex check * Handle invalid NextState values in cMultiVersionProtocol Co-authored-by: Tiger Wang --- src/Blocks/BlockHandler.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/Blocks/BlockHandler.h') diff --git a/src/Blocks/BlockHandler.h b/src/Blocks/BlockHandler.h index cc701ca8e..13c3a84af 100644 --- a/src/Blocks/BlockHandler.h +++ b/src/Blocks/BlockHandler.h @@ -66,12 +66,12 @@ public: cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, Vector3i a_BlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta - ) const {}; + ) const {} /** Called by cPlayer::PlaceBlocks() for each block after it has been set to the world. Called after OnPlaced(). */ virtual void OnPlacedByPlayer( cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer & a_Player, const sSetBlock & a_BlockChange - ) const {}; + ) const {} /** Called just after the player breaks the block. The block is already dug up in the world, the original block type and meta is passed in a_OldBlockType and a_OldBlockMeta. @@ -91,7 +91,7 @@ public: cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, Vector3i a_BlockPos, BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta - ) const {}; + ) const {} /** Called when a direct neighbor of this block has been changed. The position is the block's own position, NOT the changed neighbor's position. @@ -241,5 +241,7 @@ public: protected: - BLOCKTYPE m_BlockType; + ~cBlockHandler() = default; + + const BLOCKTYPE m_BlockType; }; -- cgit v1.2.3