mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 23:44:35 +00:00
Force inline string copy functions.
This commit is contained in:
parent
5e0eb7e26b
commit
a04f830962
@ -5,11 +5,12 @@
|
||||
#include <string.h>
|
||||
|
||||
#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 );
|
||||
|
Loading…
Reference in New Issue
Block a user