mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 14:49:53 +08:00
Update vector.h (#551)
Made the value parameter to resize() a const_reference instead of a value type to spare the unnecessary copy
This commit is contained in:
parent
cace71c3f7
commit
97732ab5cd
@ -224,7 +224,7 @@ namespace etl
|
||||
///\param new_size The new size.
|
||||
///\param value The value to fill new elements with. Default = default constructed value.
|
||||
//*********************************************************************
|
||||
void resize(size_t new_size, T value)
|
||||
void resize(size_t new_size, const_reference value)
|
||||
{
|
||||
ETL_ASSERT(new_size <= CAPACITY, ETL_ERROR(vector_full));
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user