From 46b75c5a19cff2a4e860064d38c821b9d01410cb Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 24 Jun 2019 19:18:52 +0200 Subject: [PATCH] Only enable tracy-internal GetThreadHandle if tracy is enabled. --- common/TracySystem.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/TracySystem.hpp b/common/TracySystem.hpp index 469b56da..26e57950 100644 --- a/common/TracySystem.hpp +++ b/common/TracySystem.hpp @@ -23,6 +23,7 @@ extern "C" __declspec(dllimport) unsigned long __stdcall GetCurrentThreadId(void namespace tracy { +#ifdef TRACY_ENABLE static inline uint64_t GetThreadHandle() { #ifdef _WIN32 @@ -38,6 +39,8 @@ static inline uint64_t GetThreadHandle() #endif } +#endif + void SetThreadName( std::thread& thread, const char* name ); void SetThreadName( std::thread::native_handle_type handle, const char* name ); const char* GetThreadName( uint64_t id );