mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Don't pre-reserve null values in the array.
This commit is contained in:
parent
2f31a9495a
commit
9af90e80db
@ -471,7 +471,7 @@ Circle Circle::Abs() const
|
||||
Array Circle::ToPointsArray(SQInteger num_segments) const
|
||||
{
|
||||
// Allocate an array with the same amount of elements as the number of segments
|
||||
Array arr(SqVM(), num_segments);
|
||||
Array arr(SqVM());
|
||||
// Iterate the specified segments array
|
||||
arr.AppendFromCounted([this](HSQUIRRELVM vm, SQInteger i, SQInteger num_segments) -> bool {
|
||||
if (i >= num_segments) return false;
|
||||
|
Loading…
Reference in New Issue
Block a user