summaryrefslogtreecommitdiffstats
path: root/src/SetChunkData.h
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2015-04-27 22:11:56 +0200
committerworktycho <work.tycho@gmail.com>2015-04-27 22:11:56 +0200
commitfacb6e7416a6d8757d3b6b24b32c29edc49e69a5 (patch)
tree52c0dd676f19d5768fdf83b959d6a5f0f5e5520a /src/SetChunkData.h
parentFix explosions trying to write to unread blockarea (diff)
parentcSetChunkData constructor explicitly requires std::move() instead of (diff)
downloadcuberite-facb6e7416a6d8757d3b6b24b32c29edc49e69a5.tar
cuberite-facb6e7416a6d8757d3b6b24b32c29edc49e69a5.tar.gz
cuberite-facb6e7416a6d8757d3b6b24b32c29edc49e69a5.tar.bz2
cuberite-facb6e7416a6d8757d3b6b24b32c29edc49e69a5.tar.lz
cuberite-facb6e7416a6d8757d3b6b24b32c29edc49e69a5.tar.xz
cuberite-facb6e7416a6d8757d3b6b24b32c29edc49e69a5.tar.zst
cuberite-facb6e7416a6d8757d3b6b24b32c29edc49e69a5.zip
Diffstat (limited to 'src/SetChunkData.h')
-rw-r--r--src/SetChunkData.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/SetChunkData.h b/src/SetChunkData.h
index 1eeb75ca9..bf5283569 100644
--- a/src/SetChunkData.h
+++ b/src/SetChunkData.h
@@ -24,8 +24,10 @@ public:
/** Constructs a new instance based on data existing elsewhere, will copy all the memory. Prefer to use the
other constructor as much as possible.
- Will move the entity and blockentity lists into the internal storage, and empty the a_Entities and
- a_BlockEntities lists.
+ Will move the entity and blockentity lists into the internal storage, and invalidate a_Entities and
+ a_BlockEntities.
+ When passing an lvalue, a_Entities and a_BlockEntities must be explicitly converted to an rvalue beforehand
+ with std::move().
a_BlockTypes and a_BlockMetas must always be valid.
If either of the light arrays are nullptr, the chunk data will be marked as not having any light at all and
will be scheduled for re-lighting once it is set into the chunkmap.
@@ -41,8 +43,8 @@ public:
const NIBBLETYPE * a_SkyLight,
const cChunkDef::HeightMap * a_HeightMap,
const cChunkDef::BiomeMap * a_Biomes,
- cEntityList & a_Entities,
- cBlockEntityList & a_BlockEntities,
+ cEntityList && a_Entities,
+ cBlockEntityList && a_BlockEntities,
bool a_ShouldMarkDirty
);