diff options
author | Bartosz Taudul <wolf.pld@gmail.com> | 2019-10-29 03:32:09 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf.pld@gmail.com> | 2019-10-29 03:32:09 +0300 |
commit | 789b95f259eac71e59125a0dc2ff41ba4d0a8cd1 (patch) | |
tree | ba315cf69f1608d40cc0696f9ecb9b85ca268bd2 /server/TracyVector.hpp | |
parent | 8c8f15c4206e0b446c78034341d99017f5364987 (diff) |
Force inline small functions.
Diffstat (limited to 'server/TracyVector.hpp')
-rw-r--r-- | server/TracyVector.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/TracyVector.hpp b/server/TracyVector.hpp index d8bac44c..e4f845d3 100644 --- a/server/TracyVector.hpp +++ b/server/TracyVector.hpp @@ -23,7 +23,7 @@ public: using iterator = T*; using const_iterator = const T*; - Vector() + tracy_force_inline Vector() : m_ptr( nullptr ) , m_size( 0 ) , m_capacity( 0 ) @@ -31,13 +31,13 @@ public: } Vector( const Vector& ) = delete; - Vector( Vector&& src ) noexcept + tracy_force_inline Vector( Vector&& src ) noexcept { memcpy( this, &src, sizeof( Vector<T> ) ); memset( &src, 0, sizeof( Vector<T> ) ); } - Vector( const T& value ) + tracy_force_inline Vector( const T& value ) : m_ptr( new T[1] ) , m_size( 1 ) , m_capacity( 0 ) @@ -46,7 +46,7 @@ public: m_ptr[0] = value; } - ~Vector() + tracy_force_inline ~Vector() { if( m_capacity != std::numeric_limits<uint8_t>::max() ) { @@ -56,7 +56,7 @@ public: } Vector& operator=( const Vector& ) = delete; - Vector& operator=( Vector&& src ) noexcept + tracy_force_inline Vector& operator=( Vector&& src ) noexcept { delete[] m_ptr; memcpy( this, &src, sizeof( Vector<T> ) ); @@ -64,7 +64,7 @@ public: return *this; } - void swap( Vector& other ) + tracy_force_inline void swap( Vector& other ) { std::swap( m_ptr, other.m_ptr ); std::swap( m_size, other.m_size ); |