From 06a74e45e247a2d23c6b5a238a3c1b9b17b6c341 Mon Sep 17 00:00:00 2001 From: tycho Date: Sat, 30 May 2015 11:11:17 +0100 Subject: Made cLightingThread own its callbacks --- src/LightingThread.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/LightingThread.h') 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 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 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 a_CallbackAfter); protected: virtual void OnChunkAvailable(int a_ChunkX, int a_ChunkZ) override -- cgit v1.2.3