From 2730a41946b5236894d65ec9cc001ed41b6a5589 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 27 Apr 2014 07:10:30 -0700 Subject: Fixed issues with gcc --- src/ChunkBuffer.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src') 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 { -- cgit v1.2.3