diff --git a/server/TracyVector.hpp b/server/TracyVector.hpp index 4ba9be1f..0502066f 100644 --- a/server/TracyVector.hpp +++ b/server/TracyVector.hpp @@ -71,9 +71,10 @@ public: tracy_force_inline void swap( Vector& other ) { - std::swap( m_ptr, other.m_ptr ); - std::swap( m_size, other.m_size ); - std::swap( m_capacity, other.m_capacity ); + uint8_t tmp[sizeof( Vector )]; + memcpy( tmp, &other, sizeof( Vector ) ); + memcpy( &other, this, sizeof( Vector ) ); + memcpy( this, tmp, sizeof( Vector ) ); } tracy_force_inline bool empty() const { return m_size == 0; }