summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/CriticalSection.h
diff options
context:
space:
mode:
authorDiusrex <killakan002@hotmail.com>2014-01-05 23:08:30 +0100
committerDiusrex <killakan002@hotmail.com>2014-01-05 23:08:30 +0100
commit487c1a24de3c375365c77232a47b99ddef0de68b (patch)
treefc4f29c1d07bbe9b8007e84db493c66aa97e6d27 /src/OSSupport/CriticalSection.h
parentChanged the release version of ASSERT. (diff)
downloadcuberite-487c1a24de3c375365c77232a47b99ddef0de68b.tar
cuberite-487c1a24de3c375365c77232a47b99ddef0de68b.tar.gz
cuberite-487c1a24de3c375365c77232a47b99ddef0de68b.tar.bz2
cuberite-487c1a24de3c375365c77232a47b99ddef0de68b.tar.lz
cuberite-487c1a24de3c375365c77232a47b99ddef0de68b.tar.xz
cuberite-487c1a24de3c375365c77232a47b99ddef0de68b.tar.zst
cuberite-487c1a24de3c375365c77232a47b99ddef0de68b.zip
Diffstat (limited to 'src/OSSupport/CriticalSection.h')
-rw-r--r--src/OSSupport/CriticalSection.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/OSSupport/CriticalSection.h b/src/OSSupport/CriticalSection.h
index 1bfe81439..73a71f5e1 100644
--- a/src/OSSupport/CriticalSection.h
+++ b/src/OSSupport/CriticalSection.h
@@ -14,9 +14,14 @@ public:
void Lock(void);
void Unlock(void);
+ // IsLocked/IsLockedByCurrentThread are only used in ASSERT statements, but because of the changes with ASSERT they must always be defined
+ // The fake versions (in Release) will not effect the program in any way
#ifdef _DEBUG
bool IsLocked(void);
bool IsLockedByCurrentThread(void);
+ #else
+ bool IsLocked(void) { return false; }
+ bool IsLockedByCurrentThread(void) { return false; }
#endif // _DEBUG
private: