Only enable tracy-internal GetThreadHandle if tracy is enabled.

This commit is contained in:
Bartosz Taudul 2019-06-24 19:18:52 +02:00
parent 79bfac9ca9
commit 46b75c5a19

View File

@ -23,6 +23,7 @@ extern "C" __declspec(dllimport) unsigned long __stdcall GetCurrentThreadId(void
namespace tracy namespace tracy
{ {
#ifdef TRACY_ENABLE
static inline uint64_t GetThreadHandle() static inline uint64_t GetThreadHandle()
{ {
#ifdef _WIN32 #ifdef _WIN32
@ -38,6 +39,8 @@ static inline uint64_t GetThreadHandle()
#endif #endif
} }
#endif
void SetThreadName( std::thread& thread, const char* name ); void SetThreadName( std::thread& thread, const char* name );
void SetThreadName( std::thread::native_handle_type handle, const char* name ); void SetThreadName( std::thread::native_handle_type handle, const char* name );
const char* GetThreadName( uint64_t id ); const char* GetThreadName( uint64_t id );