From aac592f98598aae327d07b2a1bb155e33c6d51b1 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Fri, 3 Apr 2020 22:23:38 +0100 Subject: Manage block entity lifetime with unique_ptr (#4080) --- src/Chunk.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Chunk.h') diff --git a/src/Chunk.h b/src/Chunk.h index dd21d0e8f..39dc07a9f 100644 --- a/src/Chunk.h +++ b/src/Chunk.h @@ -1,6 +1,7 @@ #pragma once +#include "BlockEntities/BlockEntity.h" #include "Entities/Entity.h" #include "ChunkData.h" @@ -653,10 +654,10 @@ private: void GetThreeRandomNumbers(int & a_X, int & a_Y, int & a_Z, int a_MaxX, int a_MaxY, int a_MaxZ); void RemoveBlockEntity(cBlockEntity * a_BlockEntity); - void AddBlockEntity (cBlockEntity * a_BlockEntity); + void AddBlockEntity (OwnedBlockEntity a_BlockEntity); /** Add a block entity to the chunk without marking the chunk dirty */ - void AddBlockEntityClean(cBlockEntity * a_BlockEntity); + void AddBlockEntityClean(OwnedBlockEntity a_BlockEntity); /** Creates a block entity for each block that needs a block entity and doesn't have one already */ void CreateBlockEntities(void); -- cgit v1.2.3