From 288744273b2b22e330ce50b934dd817f280b195a Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 19 Jun 2018 19:38:56 +0200 Subject: [PATCH] Fallback to callback-less version of macros if no callback support. --- Tracy.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Tracy.hpp b/Tracy.hpp index 6f547943..01934794 100644 --- a/Tracy.hpp +++ b/Tracy.hpp @@ -64,8 +64,14 @@ #define TracyAlloc( ptr, size ) tracy::Profiler::MemAlloc( ptr, size ); #define TracyFree( ptr ) tracy::Profiler::MemFree( ptr ); -#define TracyAllocS( ptr, size, depth ) tracy::Profiler::MemAllocCallstack( ptr, size, depth ); -#define TracyFreeS( ptr, depth ) tracy::Profiler::MemFreeCallstack( ptr, depth ); + +#ifdef TRACY_HAS_CALLSTACK +# define TracyAllocS( ptr, size, depth ) tracy::Profiler::MemAllocCallstack( ptr, size, depth ); +# define TracyFreeS( ptr, depth ) tracy::Profiler::MemFreeCallstack( ptr, depth ); +#else +# define TracyAllocS( ptr, size, depth ) TracyAlloc( ptr, size ) +# define TracyFreeS( ptr, depth ) TracyFree( ptr ) +#endif #endif