mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-29 08:54:34 +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 )
|
static tracy_force_inline char* CopyString( const char* src )
|
||||||
{
|
{
|
||||||
const auto sz = strlen( src );
|
return CopyString( src, strlen( src ) );
|
||||||
auto dst = (char*)tracy_malloc( sz + 1 );
|
|
||||||
memcpy( dst, src, sz );
|
|
||||||
dst[sz] = '\0';
|
|
||||||
return dst;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static tracy_force_inline char* CopyStringFast( const char* src, size_t sz )
|
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 )
|
static tracy_force_inline char* CopyStringFast( const char* src )
|
||||||
{
|
{
|
||||||
const auto sz = strlen( src );
|
return CopyStringFast( src, strlen( src ) );
|
||||||
auto dst = (char*)tracy_malloc_fast( sz + 1 );
|
|
||||||
memcpy( dst, src, sz );
|
|
||||||
dst[sz] = '\0';
|
|
||||||
return dst;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user