mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-20 23:31:13 -06:00
Return objects by reference instead of always cloning
This commit is contained in:
parent
1741301973
commit
c0789506e4
30 changed files with 158 additions and 54 deletions
|
@ -16,7 +16,7 @@ my $polyline = Slic3r::Polyline->new(@$points);
|
|||
is_deeply $polyline->pp, $points, 'polyline roundtrip';
|
||||
|
||||
is ref($polyline->arrayref), 'ARRAY', 'polyline arrayref is unblessed';
|
||||
isa_ok $polyline->[0], 'Slic3r::Point', 'polyline point is blessed';
|
||||
isa_ok $polyline->[0], 'Slic3r::Point::Ref', 'polyline point is blessed';
|
||||
|
||||
my $lines = $polyline->lines;
|
||||
is_deeply [ map $_->pp, @$lines ], [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue