summaryrefslogtreecommitdiffstats
path: root/src/SetChunkData.cpp
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.cpp
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.cpp')
-rw-r--r--src/SetChunkData.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/SetChunkData.cpp b/src/SetChunkData.cpp
index 5a0bea980..f2b58570d 100644
--- a/src/SetChunkData.cpp
+++ b/src/SetChunkData.cpp
@@ -33,8 +33,8 @@ cSetChunkData::cSetChunkData(
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
) :
m_ChunkX(a_ChunkX),
@@ -84,8 +84,8 @@ cSetChunkData::cSetChunkData(
}
// Move entities and blockentities:
- std::swap(m_Entities, a_Entities);
- std::swap(m_BlockEntities, a_BlockEntities);
+ m_Entities = std::move(a_Entities);
+ m_BlockEntities = std::move(a_BlockEntities);
}