summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/CriticalSection.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-01-07 13:57:34 +0100
committerTycho <work.tycho+git@gmail.com>2014-01-07 13:57:34 +0100
commit0b79ad0d5dd9d2ddcbff4f7351ebd83ce22fb53f (patch)
treed2593b129bf0e83d72937cf52e8a9283c85be46a /src/OSSupport/CriticalSection.h
parentMerge branch 'master' of github.com:mc-server/MCServer (diff)
parentAdded Base64Encode(). (diff)
downloadcuberite-0b79ad0d5dd9d2ddcbff4f7351ebd83ce22fb53f.tar
cuberite-0b79ad0d5dd9d2ddcbff4f7351ebd83ce22fb53f.tar.gz
cuberite-0b79ad0d5dd9d2ddcbff4f7351ebd83ce22fb53f.tar.bz2
cuberite-0b79ad0d5dd9d2ddcbff4f7351ebd83ce22fb53f.tar.lz
cuberite-0b79ad0d5dd9d2ddcbff4f7351ebd83ce22fb53f.tar.xz
cuberite-0b79ad0d5dd9d2ddcbff4f7351ebd83ce22fb53f.tar.zst
cuberite-0b79ad0d5dd9d2ddcbff4f7351ebd83ce22fb53f.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: