mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Do not duplicate code.
This commit is contained in:
parent
a04f830962
commit
f52ac31468
@ -20,11 +20,7 @@ static tracy_force_inline char* CopyString( const char* src, size_t sz )
|
||||
|
||||
static tracy_force_inline char* CopyString( const char* src )
|
||||
{
|
||||
const auto sz = strlen( src );
|
||||
auto dst = (char*)tracy_malloc( sz + 1 );
|
||||
memcpy( dst, src, sz );
|
||||
dst[sz] = '\0';
|
||||
return dst;
|
||||
return CopyString( src, strlen( src ) );
|
||||
}
|
||||
|
||||
static tracy_force_inline char* CopyStringFast( const char* src, size_t sz )
|
||||
@ -37,11 +33,7 @@ static tracy_force_inline char* CopyStringFast( const char* src, size_t sz )
|
||||
|
||||
static tracy_force_inline char* CopyStringFast( const char* src )
|
||||
{
|
||||
const auto sz = strlen( src );
|
||||
auto dst = (char*)tracy_malloc_fast( sz + 1 );
|
||||
memcpy( dst, src, sz );
|
||||
dst[sz] = '\0';
|
||||
return dst;
|
||||
return CopyStringFast( src, strlen( src ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user