mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Implement single element erase() in TracyVector.
This commit is contained in:
parent
7e3ddfff1f
commit
a0729d3500
@ -119,6 +119,14 @@ public:
|
||||
memcpy( m_ptr + dist, begin, sz * sizeof( T ) );
|
||||
}
|
||||
|
||||
T* erase( T* it )
|
||||
{
|
||||
assert( it >= m_ptr && it <= m_ptr + m_size );
|
||||
m_size--;
|
||||
memmove( it, it+1, m_size * sizeof( T ) );
|
||||
return it;
|
||||
}
|
||||
|
||||
T* erase( T* begin, T* end )
|
||||
{
|
||||
assert( begin >= m_ptr && begin <= m_ptr + m_size );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user