mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-30 14:24:08 +08:00
Array<>::resize() pass-by-value fix
This commit is contained in:
parent
314e117f7e
commit
fe57f3f5c5
@ -341,7 +341,7 @@ public:
|
||||
Base::at(size() - 1) = value;
|
||||
}
|
||||
|
||||
void resize(SizeType new_size, ValueType filler = ValueType())
|
||||
void resize(SizeType new_size, const ValueType& filler)
|
||||
{
|
||||
if (new_size > size())
|
||||
{
|
||||
@ -357,6 +357,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void resize(SizeType new_size)
|
||||
{
|
||||
resize(new_size, ValueType());
|
||||
}
|
||||
|
||||
/*
|
||||
* Comparison operators
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user