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
{
extern const char* PointerCheckA;
const char* PointerCheckB = "tracy";
static Profiler* s_instance = nullptr;
Profiler::Profiler()
: m_shutdown( false )
{
assert( PointerCheckA == PointerCheckB );
assert( !s_instance );
s_instance = this;

View File

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