diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-09-17 15:51:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-17 15:51:42 +0200 |
commit | c3d2956ba588a4559fabc36a0c1fc7dd28279314 (patch) | |
tree | b8210f994441a20ab08499df442e15fb9afaaf30 /src/BlockInfo.h | |
parent | Add some const qualifiers to functions (#4874) (diff) | |
download | cuberite-c3d2956ba588a4559fabc36a0c1fc7dd28279314.tar cuberite-c3d2956ba588a4559fabc36a0c1fc7dd28279314.tar.gz cuberite-c3d2956ba588a4559fabc36a0c1fc7dd28279314.tar.bz2 cuberite-c3d2956ba588a4559fabc36a0c1fc7dd28279314.tar.lz cuberite-c3d2956ba588a4559fabc36a0c1fc7dd28279314.tar.xz cuberite-c3d2956ba588a4559fabc36a0c1fc7dd28279314.tar.zst cuberite-c3d2956ba588a4559fabc36a0c1fc7dd28279314.zip |
Diffstat (limited to '')
-rw-r--r-- | src/BlockInfo.h | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/BlockInfo.h b/src/BlockInfo.h index 5992db9d9..44e8b5d43 100644 --- a/src/BlockInfo.h +++ b/src/BlockInfo.h @@ -51,13 +51,14 @@ public: See Physics\Explodinator.cpp for details of explosion block destruction. */ static float GetExplosionAbsorption(BLOCKTYPE Block); - inline static cBlockHandler * GetHandler (BLOCKTYPE a_Type) { return Get(a_Type).m_Handler.get(); } - /** Creates a default BlockInfo structure, initializes all values to their defaults */ cBlockInfo(); + /** Gets the blockhandler for the given block type. */ + static cBlockHandler * GetHandler(BLOCKTYPE a_Type); private: + /** Storage for all the BlockInfo structures. */ class cBlockInfoArray; @@ -99,15 +100,6 @@ private: /** Block's hardness. The greater the value the longer the player needs to break the block. */ float m_Hardness; - - /** Custom deleter allows cBlockHandler to be an incomplete type. */ - struct sHandlerDeleter - { - void operator () (cBlockHandler * a_Handler); - }; - - /** Associated block handler. */ - std::unique_ptr<cBlockHandler, sHandlerDeleter> m_Handler; }; // tolua_export |