Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf.pld@gmail.com>2020-08-15 03:14:29 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2020-08-15 03:14:29 +0300
commitbe0e3b9cc4aef9a4a6153dcd082c906cec8992bb (patch)
treef2e74fe033fcffd061a2d15b24e98a6b2b98278c /server/TracyVector.hpp
parent5243bfe5a013fdfbd5e24df1b2b110087990cab5 (diff)
Silence memcpy/memset warnings.
Diffstat (limited to 'server/TracyVector.hpp')
-rw-r--r--server/TracyVector.hpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/server/TracyVector.hpp b/server/TracyVector.hpp
index 16192d02..5eaa54f9 100644
--- a/server/TracyVector.hpp
+++ b/server/TracyVector.hpp
@@ -31,14 +31,14 @@ public:
tracy_force_inline Vector()
{
- memset( this, 0, sizeof( Vector<T> ) );
+ memset( (char*)this, 0, sizeof( Vector<T> ) );
}
Vector( const Vector& ) = delete;
tracy_force_inline Vector( Vector&& src ) noexcept
{
- memcpy( this, &src, sizeof( Vector<T> ) );
- memset( &src, 0, sizeof( Vector<T> ) );
+ memcpy( (char*)this, &src, sizeof( Vector<T> ) );
+ memset( (char*)&src, 0, sizeof( Vector<T> ) );
}
tracy_force_inline Vector( const T& value )
@@ -68,17 +68,17 @@ public:
memUsage -= Capacity() * sizeof( T );
free( m_ptr );
}
- memcpy( this, &src, sizeof( Vector<T> ) );
- memset( &src, 0, sizeof( Vector<T> ) );
+ memcpy( (char*)this, &src, sizeof( Vector<T> ) );
+ memset( (char*)&src, 0, sizeof( Vector<T> ) );
return *this;
}
tracy_force_inline void swap( Vector& other )
{
uint8_t tmp[sizeof( Vector<T> )];
- memcpy( tmp, &other, sizeof( Vector<T> ) );
- memcpy( &other, this, sizeof( Vector<T> ) );
- memcpy( this, tmp, sizeof( Vector<T> ) );
+ memcpy( (char*)tmp, &other, sizeof( Vector<T> ) );
+ memcpy( (char*)&other, this, sizeof( Vector<T> ) );
+ memcpy( (char*)this, tmp, sizeof( Vector<T> ) );
}
tracy_force_inline bool empty() const { return m_size == 0; }
@@ -310,7 +310,7 @@ private:
{
if( std::is_trivially_copyable<T>() )
{
- memcpy( ptr, m_ptr, m_size * sizeof( T ) );
+ memcpy( (char*)ptr, m_ptr, m_size * sizeof( T ) );
}
else
{