From e839a3153f2d5392e26e1b8d8965eb2461733470 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 21 Feb 2019 11:40:56 +0100 Subject: [PATCH] Just use getprogname(). --- client/TracyProfiler.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 9879f2e4..f6dd3105 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -28,11 +28,6 @@ #endif #ifdef __APPLE__ -# include -# include -# if TARGET_OS_IOS == 0 -# include -# endif # include # include #endif @@ -230,11 +225,8 @@ static const char* GetProcessName() #elif defined _GNU_SOURCE || defined __CYGWIN__ processName = program_invocation_short_name; #elif defined __APPLE__ -# if TARGET_OS_IOS == 0 - static char buf[1024]; - proc_name( getpid(), buf, 1024 ); - processName = buf; -# endif + auto buf = getprogname(); + if( buf ) processName = buf; #endif return processName; }