From c3d2956ba588a4559fabc36a0c1fc7dd28279314 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Thu, 17 Sep 2020 14:51:42 +0100 Subject: BlockHandler: no dynamic allocation (#4862) * BlockHandler: no dynamic allocation --- src/Blocks/BlockHandler.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Blocks/BlockHandler.h') diff --git a/src/Blocks/BlockHandler.h b/src/Blocks/BlockHandler.h index 90866fbb7..96e251f49 100644 --- a/src/Blocks/BlockHandler.h +++ b/src/Blocks/BlockHandler.h @@ -228,12 +228,12 @@ public: Helper used in many ConvertToPickups() implementations. */ static bool ToolHasSilkTouch(const cItem * a_Tool); + // Gets the blockhandler for the given block type. + static cBlockHandler & GetBlockHandler(BLOCKTYPE a_BlockType); protected: - BLOCKTYPE m_BlockType; - // Creates a new blockhandler for the given block type. For internal use only, use ::GetBlockHandler() instead. - static cBlockHandler * CreateBlockHandler(BLOCKTYPE a_BlockType); + BLOCKTYPE m_BlockType; friend class cBlockInfo; }; -- cgit v1.2.3