aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/thread.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-08-22 00:24:49 +0200
committerDan Engelbrecht <[email protected]>2023-08-22 00:24:49 +0200
commit1a2f64744eb58e5a565f7bdd60979719e25a1674 (patch)
treee2c6e78fdc6553d298f2e08343d01443cc2dfbe0 /src/zencore/thread.cpp
parent0.2.17 (diff)
downloadzen-1a2f64744eb58e5a565f7bdd60979719e25a1674.tar.xz
zen-1a2f64744eb58e5a565f7bdd60979719e25a1674.zip
make sure trace::ThreadRegister is inside ZEN_WITH_TRACE
Diffstat (limited to 'src/zencore/thread.cpp')
-rw-r--r--src/zencore/thread.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/zencore/thread.cpp b/src/zencore/thread.cpp
index d95f5d542..33056e4df 100644
--- a/src/zencore/thread.cpp
+++ b/src/zencore/thread.cpp
@@ -101,8 +101,9 @@ SetCurrentThreadName([[maybe_unused]] std::string_view ThreadName)
{
std::string ThreadNameZ{ThreadName};
const int ThreadId = GetCurrentThreadId();
-
+#if ZEN_WITH_TRACE
trace::ThreadRegister(ThreadNameZ.c_str(), /* system id */ ThreadId, /* sort id */ 0);
+#endif // ZEN_WITH_TRACE
#if ZEN_PLATFORM_WINDOWS
// The SetThreadDescription API works even if no debugger is attached.