From d1b0d0f5b5c288c235c8bb3412b32bb446564e66 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Thu, 20 Aug 2020 12:50:22 +0100 Subject: Remove level of indirection in cChunk storage - No more unique_ptr storage --- src/Chunk.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/Chunk.h') diff --git a/src/Chunk.h b/src/Chunk.h index 25de55ec6..8c236045e 100644 --- a/src/Chunk.h +++ b/src/Chunk.h @@ -64,7 +64,6 @@ public: cChunk( int a_ChunkX, int a_ChunkZ, // Chunk coords cChunkMap * a_ChunkMap, cWorld * a_World, // Parent objects - cChunk * a_NeighborXM, cChunk * a_NeighborXP, cChunk * a_NeighborZM, cChunk * a_NeighborZP, // Neighbor chunks cAllocationPool & a_Pool ); cChunk(cChunk & other) = delete; @@ -89,10 +88,10 @@ public: /** Returns true iff the chunk has changed since it was last saved. */ bool IsDirty(void) const {return m_IsDirty; } - bool CanUnload(void); + bool CanUnload(void) const; /** Returns true if the chunk could have been unloaded if it weren't dirty */ - bool CanUnloadAfterSaving(void); + bool CanUnloadAfterSaving(void) const; bool IsLightValid(void) const {return m_IsLightValid; } @@ -673,7 +672,7 @@ private: void MoveEntityToNewChunk(OwnedEntity a_Entity); /** Check m_Entities for cPlayer objects. */ - bool HasPlayerEntities(); + bool HasPlayerEntities() const; }; typedef cChunk * cChunkPtr; -- cgit v1.2.3