summaryrefslogtreecommitdiffstats
path: root/src/OSSupport
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-01-26 10:41:55 +0100
committerGitHub <noreply@github.com>2021-01-26 10:41:55 +0100
commit50a94f972d26ee15fc22cce657d13023d1022905 (patch)
tree24417c741cf85061b73098a32e61ecd3749be05e /src/OSSupport
parentRedstone: inline -> static (diff)
downloadcuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar.gz
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar.bz2
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar.lz
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar.xz
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar.zst
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.zip
Diffstat (limited to 'src/OSSupport')
-rw-r--r--src/OSSupport/IsThread.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/OSSupport/IsThread.cpp b/src/OSSupport/IsThread.cpp
index d60d0d9eb..4190acb26 100644
--- a/src/OSSupport/IsThread.cpp
+++ b/src/OSSupport/IsThread.cpp
@@ -11,7 +11,7 @@
-#if defined(_MSC_VER) && defined(_DEBUG)
+#if defined(_MSC_VER) && !defined(NDEBUG)
// Code adapted from MSDN: https://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx
const DWORD MS_VC_EXCEPTION = 0x406D1388;
@@ -39,7 +39,7 @@
{
}
}
-#endif // _MSC_VER && _DEBUG
+#endif // _MSC_VER && !NDEBUG
@@ -84,7 +84,7 @@ bool cIsThread::Start(void)
// Initialize the thread:
m_Thread = std::thread(&cIsThread::DoExecute, this);
- #if defined (_MSC_VER) && defined(_DEBUG)
+ #if defined(_MSC_VER) && !defined(NDEBUG)
if (!m_ThreadName.empty())
{
SetThreadName(&m_Thread, m_ThreadName.c_str());