From a04f83096201eb9c75bfb1d297d26e38f048c8c0 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 20 Jul 2022 01:04:59 +0200 Subject: [PATCH] Force inline string copy functions. --- public/client/TracyStringHelpers.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/public/client/TracyStringHelpers.hpp b/public/client/TracyStringHelpers.hpp index 95e33675..f6593031 100644 --- a/public/client/TracyStringHelpers.hpp +++ b/public/client/TracyStringHelpers.hpp @@ -5,11 +5,12 @@ #include #include "../common/TracyAlloc.hpp" +#include "../common/TracyForceInline.hpp" namespace tracy { -static inline char* CopyString( const char* src, size_t sz ) +static tracy_force_inline char* CopyString( const char* src, size_t sz ) { auto dst = (char*)tracy_malloc( sz + 1 ); memcpy( dst, src, sz ); @@ -17,7 +18,7 @@ static inline char* CopyString( const char* src, size_t sz ) return dst; } -static inline char* CopyString( const char* src ) +static tracy_force_inline char* CopyString( const char* src ) { const auto sz = strlen( src ); auto dst = (char*)tracy_malloc( sz + 1 ); @@ -26,7 +27,7 @@ static inline char* CopyString( const char* src ) return dst; } -static inline char* CopyStringFast( const char* src, size_t sz ) +static tracy_force_inline char* CopyStringFast( const char* src, size_t sz ) { auto dst = (char*)tracy_malloc_fast( sz + 1 ); memcpy( dst, src, sz ); @@ -34,7 +35,7 @@ static inline char* CopyStringFast( const char* src, size_t sz ) return dst; } -static inline char* CopyStringFast( const char* src ) +static tracy_force_inline char* CopyStringFast( const char* src ) { const auto sz = strlen( src ); auto dst = (char*)tracy_malloc_fast( sz + 1 );