mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Implement custom vector swap.
This commit is contained in:
parent
a632d9e2a3
commit
6c5efbfdce
@ -1,6 +1,7 @@
|
||||
#ifndef __TRACYVECTOR_HPP__
|
||||
#define __TRACYVECTOR_HPP__
|
||||
|
||||
#include <algorithm>
|
||||
#include <assert.h>
|
||||
#include <limits>
|
||||
#include <stdint.h>
|
||||
@ -63,6 +64,13 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
tracy_force_inline bool empty() const { return m_size == 0; }
|
||||
tracy_force_inline size_t size() const { return m_size; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user