From 3cc7cc596e67cce2decf1f34465af593c9d70dfa Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 27 Sep 2017 01:02:04 +0200 Subject: [PATCH] Remove GetNewId() from Profiler interface. --- client/TracyProfiler.cpp | 9 ++++----- client/TracyProfiler.hpp | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 42918cdf..f1163e4d 100755 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -37,6 +37,10 @@ static moodycamel::ProducerToken& GetToken() static std::atomic s_id( 0 ); +static inline uint64_t GetNewId() +{ + return s_id.fetch_add( 1, std::memory_order_relaxed ); +} #ifndef TRACY_DISABLE Profiler s_profiler; @@ -74,11 +78,6 @@ Profiler::~Profiler() s_instance = nullptr; } -uint64_t Profiler::GetNewId() -{ - return s_id.fetch_add( 1, std::memory_order_relaxed ); -} - uint64_t Profiler::ZoneBegin( QueueZoneBegin&& data ) { auto id = GetNewId(); diff --git a/client/TracyProfiler.hpp b/client/TracyProfiler.hpp index ffcaa845..40358796 100755 --- a/client/TracyProfiler.hpp +++ b/client/TracyProfiler.hpp @@ -32,7 +32,6 @@ public: Profiler(); ~Profiler(); - static uint64_t GetNewId(); static int64_t GetTime() { #if defined _MSC_VER || defined __CYGWIN__