mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Explicitly cast size_t to uint32_t.
This commit is contained in:
parent
8b3895473d
commit
6e3909825f
@ -153,7 +153,7 @@ static inline int LuaZoneBegin( lua_State* L )
|
|||||||
// 1b null terminator
|
// 1b null terminator
|
||||||
// ssz source file name
|
// ssz source file name
|
||||||
// 1b null terminator
|
// 1b null terminator
|
||||||
const uint32_t sz = 4 + 4 + 4 + fsz + 1 + ssz + 1;
|
const uint32_t sz = uint32_t( 4 + 4 + 4 + fsz + 1 + ssz + 1 );
|
||||||
auto ptr = (char*)tracy_malloc( sz );
|
auto ptr = (char*)tracy_malloc( sz );
|
||||||
memcpy( ptr, &sz, 4 );
|
memcpy( ptr, &sz, 4 );
|
||||||
memcpy( ptr + 4, &color, 4 );
|
memcpy( ptr + 4, &color, 4 );
|
||||||
@ -210,7 +210,7 @@ static inline int LuaZoneBeginN( lua_State* L )
|
|||||||
// ssz source file name
|
// ssz source file name
|
||||||
// 1b null terminator
|
// 1b null terminator
|
||||||
// nsz zone name
|
// nsz zone name
|
||||||
const uint32_t sz = 4 + 4 + 4 + fsz + 1 + ssz + 1 + nsz;
|
const uint32_t sz = uint32_t( 4 + 4 + 4 + fsz + 1 + ssz + 1 + nsz );
|
||||||
auto ptr = (char*)tracy_malloc( sz );
|
auto ptr = (char*)tracy_malloc( sz );
|
||||||
memcpy( ptr, &sz, 4 );
|
memcpy( ptr, &sz, 4 );
|
||||||
memcpy( ptr + 4, &color, 4 );
|
memcpy( ptr + 4, &color, 4 );
|
||||||
|
Loading…
Reference in New Issue
Block a user