1
0
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:
Sandu Liviu Catalin 2020-04-20 16:07:42 +03:00
parent 2f31a9495a
commit 9af90e80db

View File

@ -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;