mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Directly access memory, omitting shift.
As always, clang generated the right code here anyways...
This commit is contained in:
parent
5a995d804b
commit
caace1ce11
@ -405,7 +405,7 @@ struct ContextSwitchUsage
|
||||
tracy_force_inline void SetTime( int64_t time ) { assert( time < (int64_t)( 1ull << 47 ) ); memcpy( ((char*)&_time_other_own)+2, &time, 4 ); memcpy( ((char*)&_time_other_own)+6, ((char*)&time)+4, 2 ); }
|
||||
tracy_force_inline uint8_t Other() const { return uint8_t( _time_other_own ); }
|
||||
tracy_force_inline void SetOther( uint8_t other ) { memcpy( &_time_other_own, &other, 1 ); }
|
||||
tracy_force_inline uint8_t Own() const { return uint8_t( _time_other_own >> 8 ); }
|
||||
tracy_force_inline uint8_t Own() const { uint8_t v; memcpy( &v, ((char*)&_time_other_own)+1, 1 );return v; }
|
||||
tracy_force_inline void SetOwn( uint8_t own ) { memcpy( ((char*)&_time_other_own)+1, &own, 1 ); }
|
||||
|
||||
uint64_t _time_other_own;
|
||||
|
Loading…
Reference in New Issue
Block a user