Memory optimizations broke multiple copies

This commit is contained in:
Alessandro Ranellucci 2012-05-19 20:30:46 +02:00
parent 5ccc0a8f62
commit 23ae015c49
2 changed files with 3 additions and 0 deletions

View File

@ -16,6 +16,7 @@ my $build = Module::Build->new(
'Math::PlanePath' => '53',
'Moo' => '0',
'perl' => '5.10.0',
'Scalar::Util' => '0',
'Time::HiRes' => '0',
},
build_requires => {

View File

@ -3,6 +3,7 @@ use strict;
use warnings;
use Math::Clipper qw();
use Scalar::Util qw(reftype);
use Slic3r::Geometry qw(A B polyline_remove_parallel_continuous_edges polyline_remove_acute_vertices
move_points same_point);
@ -30,6 +31,7 @@ sub serialize {
sub deserialize {
my $self = shift;
return $self if reftype $self ne 'SCALAR';
my @v = unpack '(l2)*', $$self;
my $o = [ map [ $v[2*$_], $v[2*$_+1] ], 0 .. int($#v/2) ];
bless $_, 'Slic3r::Point' for @$o;