Fixing preprocessor formatting

This commit is contained in:
Andrey Voroshilov 2020-07-08 03:48:37 -07:00
parent 6a72560989
commit 71ca0683d6

View File

@ -913,7 +913,7 @@ struct ProfilerThreadData
# endif # endif
}; };
#ifdef TRACY_MANUAL_LIFETIME # ifdef TRACY_MANUAL_LIFETIME
ProfilerData* s_profilerData = nullptr; ProfilerData* s_profilerData = nullptr;
TRACY_API void StartupProfiler() TRACY_API void StartupProfiler()
{ {
@ -930,7 +930,7 @@ TRACY_API void ShutdownProfiler()
delete s_profilerData; delete s_profilerData;
s_profilerData = nullptr; s_profilerData = nullptr;
} }
#else # else
static std::atomic<int> profilerDataLock { 0 }; static std::atomic<int> profilerDataLock { 0 };
static std::atomic<ProfilerData*> profilerData { nullptr }; static std::atomic<ProfilerData*> profilerData { nullptr };
@ -952,7 +952,7 @@ static ProfilerData& GetProfilerData()
} }
return *ptr; return *ptr;
} }
#endif # endif
static ProfilerThreadData& GetProfilerThreadData() static ProfilerThreadData& GetProfilerThreadData()
{ {
@ -974,13 +974,13 @@ std::atomic<ThreadNameData*>& GetThreadNameData() { return GetProfilerData().thr
TRACY_API LuaZoneState& GetLuaZoneState() { return GetProfilerThreadData().luaZoneState; } TRACY_API LuaZoneState& GetLuaZoneState() { return GetProfilerThreadData().luaZoneState; }
# endif # endif
#ifdef TRACY_MANUAL_LIFETIME # ifdef TRACY_MANUAL_LIFETIME
#else # else
namespace namespace
{ {
const auto& __profiler_init = GetProfiler(); const auto& __profiler_init = GetProfiler();
} }
#endif # endif
#else #else
TRACY_API void InitRPMallocThread() TRACY_API void InitRPMallocThread()
@ -1022,7 +1022,7 @@ std::atomic<ThreadNameData*>& s_threadNameData = s_threadNameDataInstance;
thread_local LuaZoneState init_order(104) s_luaZoneState { 0, false }; thread_local LuaZoneState init_order(104) s_luaZoneState { 0, false };
# endif # endif
#ifdef TRACY_MANUAL_LIFETIME # ifdef TRACY_MANUAL_LIFETIME
Profiler* s_profiler = nullptr; Profiler* s_profiler = nullptr;
TRACY_API void StartupProfiler() TRACY_API void StartupProfiler()
@ -1035,10 +1035,10 @@ TRACY_API void ShutdownProfiler()
s_profiler = nullptr; s_profiler = nullptr;
} }
TRACY_API Profiler& GetProfiler() { return *s_profiler; } TRACY_API Profiler& GetProfiler() { return *s_profiler; }
#else # else
static Profiler init_order(105) s_profiler; static Profiler init_order(105) s_profiler;
TRACY_API Profiler& GetProfiler() { return s_profiler; } TRACY_API Profiler& GetProfiler() { return s_profiler; }
#endif # endif
TRACY_API moodycamel::ConcurrentQueue<QueueItem>::ExplicitProducer* GetToken() { return s_token.ptr; } TRACY_API moodycamel::ConcurrentQueue<QueueItem>::ExplicitProducer* GetToken() { return s_token.ptr; }
TRACY_API moodycamel::ConcurrentQueue<QueueItem>& GetQueue() { return s_queue; } TRACY_API moodycamel::ConcurrentQueue<QueueItem>& GetQueue() { return s_queue; }