From f3ec768dfbad65e269da9c43f1ca982d0fb7234d Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 21 Dec 2020 14:31:44 +0000 Subject: unique_ptr to plain member --- src/Chunk.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/Chunk.h') diff --git a/src/Chunk.h b/src/Chunk.h index bfd860b1c..28f7b0bec 100644 --- a/src/Chunk.h +++ b/src/Chunk.h @@ -111,7 +111,7 @@ public: void MarkLoadFailed(void); /** Gets all chunk data, calls the a_Callback's methods for each data type */ - void GetAllData(cChunkDataCallback & a_Callback); + void GetAllData(cChunkDataCallback & a_Callback) const; /** Sets all chunk data as either loaded from the storage or generated. BlockLight and BlockSkyLight are optional, if not present, chunk will be marked as unlighted. @@ -172,11 +172,7 @@ public: GetBlockTypeMeta({ a_RelX, a_RelY, a_RelZ }, a_BlockType, a_BlockMeta); } - void GetBlockInfo(Vector3i a_RelPos, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_Meta, NIBBLETYPE & a_SkyLight, NIBBLETYPE & a_BlockLight); - void GetBlockInfo(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_Meta, NIBBLETYPE & a_SkyLight, NIBBLETYPE & a_BlockLight) - { - GetBlockInfo({ a_RelX, a_RelY, a_RelZ }, a_BlockType, a_Meta, a_SkyLight, a_BlockLight); - } + void GetBlockInfo(Vector3i a_RelPos, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_Meta, NIBBLETYPE & a_SkyLight, NIBBLETYPE & a_BlockLight) const; /** Convert absolute coordinates into relative coordinates. Returns false on failure to obtain a valid chunk. Returns true otherwise. -- cgit v1.2.3