1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-30 04:43:53 +00:00

Make sure string constants are at the same memory address.

This commit is contained in:
Bartosz Taudul 2017-09-10 20:02:40 +02:00
parent b4f8901a8d
commit ea9464f4f6
2 changed files with 6 additions and 0 deletions

View File

@ -6,11 +6,15 @@
namespace tracy namespace tracy
{ {
extern const char* PointerCheckA;
const char* PointerCheckB = "tracy";
static Profiler* s_instance = nullptr; static Profiler* s_instance = nullptr;
Profiler::Profiler() Profiler::Profiler()
: m_shutdown( false ) : m_shutdown( false )
{ {
assert( PointerCheckA == PointerCheckB );
assert( !s_instance ); assert( !s_instance );
s_instance = this; s_instance = this;

View File

@ -11,6 +11,8 @@
namespace tracy namespace tracy
{ {
const char* PointerCheckA = "tracy";
void SetThreadName( std::thread& thread, const char* name ) void SetThreadName( std::thread& thread, const char* name )
{ {
#ifdef _WIN32 #ifdef _WIN32