1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Prevent storing variable on stack.

This commit is contained in:
Bartosz Taudul
2019-10-24 23:40:21 +02:00
parent 1fe76be955
commit d6a8a8532f
2 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ public:
struct ZoneThreadData
{
ZoneEvent* Zone() const { return (ZoneEvent*)( _zone_thread >> 16 ); }
void SetZone( ZoneEvent* zone ) { assert( ( uint64_t( zone ) & 0xFFFF000000000000 ) == 0 ); memcpy( ((char*)&_zone_thread)+2, &zone, 6 ); }
void SetZone( ZoneEvent* zone ) { assert( ( uint64_t( zone ) & 0xFFFF000000000000 ) == 0 ); memcpy( ((char*)&_zone_thread)+2, &zone, 4 ); memcpy( ((char*)&_zone_thread)+6, ((char*)&zone)+4, 2 ); }
uint16_t Thread() const { return uint16_t( _zone_thread & 0xFFFF ); }
void SetThread( uint16_t thread ) { memcpy( &_zone_thread, &thread, 2 ); }