Update vector.h

This commit is contained in:
blueloveTH 2023-04-07 11:16:08 +08:00
parent 4e63588589
commit 97d0b17b8e

View File

@ -16,9 +16,10 @@ struct small_vector{
_data = _buffer; _data = _buffer;
} }
small_vector(int size): _size(size), _capacity(N){ small_vector(int size): _size(0), _capacity(N){
_data = _buffer; _data = _buffer;
reserve(size); reserve(size);
_size = size;
} }
small_vector(const small_vector& other): _size(other._size), _capacity(other._capacity) { small_vector(const small_vector& other): _size(other._size), _capacity(other._capacity) {