mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Incomplete work for refactoring regions and flows
This commit is contained in:
@@ -175,6 +175,22 @@ sub setenv {
|
||||
}
|
||||
}
|
||||
|
||||
sub equals {
|
||||
my ($self, $other) = @_;
|
||||
return @{ $self->diff($other) } == 0;
|
||||
}
|
||||
|
||||
sub diff {
|
||||
my ($self, $other) = @_;
|
||||
|
||||
my @diff = ();
|
||||
foreach my $opt_key (sort @{$self->get_keys}) {
|
||||
push @diff, $opt_key
|
||||
if !$other->has($opt_key) || $other->serialize($opt_key) ne $self->serialize($opt_key);
|
||||
}
|
||||
return [@diff];
|
||||
}
|
||||
|
||||
# this method is idempotent by design
|
||||
sub validate {
|
||||
my $self = shift;
|
||||
|
||||
Reference in New Issue
Block a user