diff options
author | Mattes D <github@xoft.cz> | 2015-06-01 15:02:42 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-06-01 15:02:42 +0200 |
commit | a54fa15bc6326d5482fae27b5fbcd42c8a34427a (patch) | |
tree | 5b2bb45d000c25554b45cdd1aeea59a96734534a /src/LightingThread.cpp | |
parent | Merge pull request #2178 from jammet/patch-7 (diff) | |
parent | Made cLightingThread own its callbacks (diff) | |
download | cuberite-a54fa15bc6326d5482fae27b5fbcd42c8a34427a.tar cuberite-a54fa15bc6326d5482fae27b5fbcd42c8a34427a.tar.gz cuberite-a54fa15bc6326d5482fae27b5fbcd42c8a34427a.tar.bz2 cuberite-a54fa15bc6326d5482fae27b5fbcd42c8a34427a.tar.lz cuberite-a54fa15bc6326d5482fae27b5fbcd42c8a34427a.tar.xz cuberite-a54fa15bc6326d5482fae27b5fbcd42c8a34427a.tar.zst cuberite-a54fa15bc6326d5482fae27b5fbcd42c8a34427a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/LightingThread.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/LightingThread.cpp b/src/LightingThread.cpp index 266744a24..7f13a94fd 100644 --- a/src/LightingThread.cpp +++ b/src/LightingThread.cpp @@ -149,11 +149,11 @@ void cLightingThread::Stop(void) -void cLightingThread::QueueChunk(int a_ChunkX, int a_ChunkZ, cChunkCoordCallback * a_CallbackAfter) +void cLightingThread::QueueChunk(int a_ChunkX, int a_ChunkZ, std::unique_ptr<cChunkCoordCallback> a_CallbackAfter) { ASSERT(m_World != nullptr); // Did you call Start() properly? - cChunkStay * ChunkStay = new cLightingChunkStay(*this, a_ChunkX, a_ChunkZ, a_CallbackAfter); + cChunkStay * ChunkStay = new cLightingChunkStay(*this, a_ChunkX, a_ChunkZ, std::move(a_CallbackAfter)); { // The ChunkStay will enqueue itself using the QueueChunkStay() once it is fully loaded // In the meantime, put it into the PendingQueue so that it can be removed when stopping the thread @@ -599,11 +599,11 @@ void cLightingThread::QueueChunkStay(cLightingChunkStay & a_ChunkStay) //////////////////////////////////////////////////////////////////////////////// // cLightingThread::cLightingChunkStay: -cLightingThread::cLightingChunkStay::cLightingChunkStay(cLightingThread & a_LightingThread, int a_ChunkX, int a_ChunkZ, cChunkCoordCallback * a_CallbackAfter) : +cLightingThread::cLightingChunkStay::cLightingChunkStay(cLightingThread & a_LightingThread, int a_ChunkX, int a_ChunkZ, std::unique_ptr<cChunkCoordCallback> a_CallbackAfter) : m_LightingThread(a_LightingThread), m_ChunkX(a_ChunkX), m_ChunkZ(a_ChunkZ), - m_CallbackAfter(a_CallbackAfter) + m_CallbackAfter(std::move(a_CallbackAfter)) { Add(a_ChunkX + 1, a_ChunkZ + 1); Add(a_ChunkX + 1, a_ChunkZ); |