mirror of
https://github.com/pocketpy/pocketpy
synced 2025-11-08 20:50:16 +00:00
Fix small vector.
This commit is contained in:
parent
78d203bdf4
commit
1a9c42ec80
@ -334,7 +334,7 @@ struct small_vector {
|
|||||||
small_vector(small_vector&& other) noexcept {
|
small_vector(small_vector&& other) noexcept {
|
||||||
if(other.is_small()) {
|
if(other.is_small()) {
|
||||||
_begin = reinterpret_cast<T*>(_buffer);
|
_begin = reinterpret_cast<T*>(_buffer);
|
||||||
uninitialized_relocate_n(other._buffer, other.size(), _buffer);
|
uninitialized_relocate_n((T*)other._buffer, other.size(), (T*)_buffer);
|
||||||
_end = _begin + other.size();
|
_end = _begin + other.size();
|
||||||
_capacity = _begin + N;
|
_capacity = _begin + N;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user