From 664ea804a3fe4a5574d31b27ebe584aafb816be7 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Wed, 3 Dec 2014 18:04:08 +0100 Subject: ByteBuffer: Re-added Single-thread access checker. --- src/ByteBuffer.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ByteBuffer.h') diff --git a/src/ByteBuffer.h b/src/ByteBuffer.h index e80763772..2a316fa32 100644 --- a/src/ByteBuffer.h +++ b/src/ByteBuffer.h @@ -133,6 +133,12 @@ protected: size_t m_DataStart; // Where the data starts in the ringbuffer size_t m_WritePos; // Where the data ends in the ringbuffer size_t m_ReadPos; // Where the next read will start in the ringbuffer + + #ifdef _DEBUG + /** The ID of the thread currently accessing the object. + Used for checking that only one thread accesses the object at a time, via cSingleThreadAccessChecker. */ + mutable std::thread::id m_ThreadID; + #endif /** Advances the m_ReadPos by a_Count bytes */ void AdvanceReadPos(size_t a_Count); -- cgit v1.2.3