summaryrefslogtreecommitdiffstats
path: root/src/LightingThread.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-06-01 15:02:42 +0200
committerMattes D <github@xoft.cz>2015-06-01 15:02:42 +0200
commita54fa15bc6326d5482fae27b5fbcd42c8a34427a (patch)
tree5b2bb45d000c25554b45cdd1aeea59a96734534a /src/LightingThread.h
parentMerge pull request #2178 from jammet/patch-7 (diff)
parentMade cLightingThread own its callbacks (diff)
downloadcuberite-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 'src/LightingThread.h')
-rw-r--r--src/LightingThread.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/LightingThread.h b/src/LightingThread.h
index 87eb9c6d8..da6be12c8 100644
--- a/src/LightingThread.h
+++ b/src/LightingThread.h
@@ -61,7 +61,7 @@ public:
void Stop(void);
/** Queues the entire chunk for lighting */
- void QueueChunk(int a_ChunkX, int a_ChunkZ, cChunkCoordCallback * a_CallbackAfter = nullptr);
+ void QueueChunk(int a_ChunkX, int a_ChunkZ, std::unique_ptr<cChunkCoordCallback> a_CallbackAfter);
/** Blocks until the queue is empty or the thread is terminated */
void WaitForQueueEmpty(void);
@@ -77,9 +77,9 @@ protected:
cLightingThread & m_LightingThread;
int m_ChunkX;
int m_ChunkZ;
- cChunkCoordCallback * m_CallbackAfter;
+ std::unique_ptr<cChunkCoordCallback> m_CallbackAfter;
- cLightingChunkStay(cLightingThread & a_LightingThread, int a_ChunkX, int a_ChunkZ, cChunkCoordCallback * a_CallbackAfter);
+ cLightingChunkStay(cLightingThread & a_LightingThread, int a_ChunkX, int a_ChunkZ, std::unique_ptr<cChunkCoordCallback> a_CallbackAfter);
protected:
virtual void OnChunkAvailable(int a_ChunkX, int a_ChunkZ) override