diff --git a/server/TracyVector.hpp b/server/TracyVector.hpp index ad47c82f..68777c41 100644 --- a/server/TracyVector.hpp +++ b/server/TracyVector.hpp @@ -4,6 +4,7 @@ #include #include #include +#include #include "../common/TracyForceInline.hpp" #include "TracyMemory.hpp" @@ -280,7 +281,17 @@ private: T* ptr = new T[CapacityNoNullptrCheck()]; if( m_size != 0 ) { - memcpy( ptr, m_ptr, m_size * sizeof( T ) ); + if( std::is_trivially_copyable() ) + { + memcpy( ptr, m_ptr, m_size * sizeof( T ) ); + } + else + { + for( uint32_t i=0; i