diff options
author | Mattes D <github@xoft.cz> | 2017-02-26 22:49:23 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2017-05-04 09:49:30 +0200 |
commit | 187abe3f5e2219e0a80c0cdca4db362e223b60ae (patch) | |
tree | b68eac26b892fa469ec5753d34d4fa8a35a53bd3 /src/Generating/PrefabStructure.cpp | |
parent | APIDoc: Removed non-existent functions and added missing return types (diff) | |
download | cuberite-187abe3f5e2219e0a80c0cdca4db362e223b60ae.tar cuberite-187abe3f5e2219e0a80c0cdca4db362e223b60ae.tar.gz cuberite-187abe3f5e2219e0a80c0cdca4db362e223b60ae.tar.bz2 cuberite-187abe3f5e2219e0a80c0cdca4db362e223b60ae.tar.lz cuberite-187abe3f5e2219e0a80c0cdca4db362e223b60ae.tar.xz cuberite-187abe3f5e2219e0a80c0cdca4db362e223b60ae.tar.zst cuberite-187abe3f5e2219e0a80c0cdca4db362e223b60ae.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/PrefabStructure.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/Generating/PrefabStructure.cpp b/src/Generating/PrefabStructure.cpp index 3ebbe8143..c37398be9 100644 --- a/src/Generating/PrefabStructure.cpp +++ b/src/Generating/PrefabStructure.cpp @@ -14,11 +14,11 @@ cPrefabStructure::cPrefabStructure( int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ, - cPlacedPieces & a_Pieces, + cPlacedPieces && a_Pieces, cTerrainHeightGenPtr a_HeightGen ): Super(a_GridX, a_GridZ, a_OriginX, a_OriginZ), - m_Pieces(a_Pieces), + m_Pieces(std::move(a_Pieces)), m_HeightGen(a_HeightGen) { } @@ -27,15 +27,6 @@ cPrefabStructure::cPrefabStructure( -cPrefabStructure::~cPrefabStructure() -{ - cPieceGenerator::FreePieces(m_Pieces); -} - - - - - void cPrefabStructure::DrawIntoChunk(cChunkDesc & a_Chunk) { // Iterate over all items @@ -47,7 +38,7 @@ void cPrefabStructure::DrawIntoChunk(cChunkDesc & a_Chunk) { PlacePieceOnGround(**itr); } - Prefab.Draw(a_Chunk, *itr); + Prefab.Draw(a_Chunk, itr->get()); } // for itr - m_PlacedPieces[] } |