mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 08:30:35 +08:00
Array<>::resize() pass-by-value fix
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user