summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-04-27 16:10:30 +0200
committerTycho <work.tycho+git@gmail.com>2014-04-27 16:10:30 +0200
commit2730a41946b5236894d65ec9cc001ed41b6a5589 (patch)
treec23c16b852b64bf5af417d689c25310057aab650 /src
parentFixed MobProximity Counter to remove chunk copys (diff)
downloadcuberite-2730a41946b5236894d65ec9cc001ed41b6a5589.tar
cuberite-2730a41946b5236894d65ec9cc001ed41b6a5589.tar.gz
cuberite-2730a41946b5236894d65ec9cc001ed41b6a5589.tar.bz2
cuberite-2730a41946b5236894d65ec9cc001ed41b6a5589.tar.lz
cuberite-2730a41946b5236894d65ec9cc001ed41b6a5589.tar.xz
cuberite-2730a41946b5236894d65ec9cc001ed41b6a5589.tar.zst
cuberite-2730a41946b5236894d65ec9cc001ed41b6a5589.zip
Diffstat (limited to '')
-rw-r--r--src/ChunkBuffer.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ChunkBuffer.h b/src/ChunkBuffer.h
index 44e447c82..a6a6da013 100644
--- a/src/ChunkBuffer.h
+++ b/src/ChunkBuffer.h
@@ -36,8 +36,8 @@ public:
#if __cplusplus < 201103L
// auto_ptr style interface for memory management
- cChunkBuffer(cChunkBuffer& other) :
- IsOwner(true);
+ cChunkBuffer(const cChunkBuffer& other) :
+ IsOwner(true)
{
for (int i = 0; i < CHUNK_SECTION_NUM; i++)
{
@@ -45,7 +45,8 @@ public:
}
other.IsOwner = false;
}
- void operator=(cChunkBuffer& other)
+
+ void operator=(const cChunkBuffer& other)
{
if(IsOwner)
{
@@ -63,7 +64,7 @@ public:
}
#else
// unique_ptr style interface for memory management
- cChunkBuffer(cChunkBuffer&& other)
+ cChunkBuffer(const cChunkBuffer&& other)
{
for (int i = 0; i < CHUNK_SECTION_NUM; i++)
{
@@ -71,7 +72,7 @@ public:
}
}
- void operator=(cChunkBuffer&& other)
+ void operator=(const cChunkBuffer&& other)
{
for (int i = 0; i < CHUNK_SECTION_NUM; i++)
{
@@ -225,7 +226,7 @@ private:
#if __cplusplus < 201103L
// auto_ptr style interface for memory management
- bool IsOwner;
+ mutable bool IsOwner;
#endif
struct sChunkSection {