From ea9464f4f68cc85b6716553d67821f63abfad67d Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 10 Sep 2017 20:02:40 +0200 Subject: [PATCH] Make sure string constants are at the same memory address. --- client/TracyProfiler.cpp | 4 ++++ client/TracySystem.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 16db0ef1..7626894e 100755 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -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; diff --git a/client/TracySystem.cpp b/client/TracySystem.cpp index 781f09c4..6dfe489f 100755 --- a/client/TracySystem.cpp +++ b/client/TracySystem.cpp @@ -11,6 +11,8 @@ namespace tracy { +const char* PointerCheckA = "tracy"; + void SetThreadName( std::thread& thread, const char* name ) { #ifdef _WIN32