replaced return; with return undef;

This commit is contained in:
JT Smith 2008-01-24 21:58:15 +00:00
parent ffa90c5fbd
commit fa09c41598
113 changed files with 287 additions and 286 deletions

View file

@ -148,7 +148,7 @@ sub getColorIndex {
return $index if ($self->getColor($index)->getId eq $color->getId);
}
return;
return undef;
}
#-------------------------------------------------------------------
@ -372,7 +372,7 @@ sub removeColor {
my $self = shift;
my $paletteIndex = shift;
return unless (defined $paletteIndex);
return undef unless (defined $paletteIndex);
my $color = $self->getColor($paletteIndex);
@ -426,10 +426,10 @@ sub setColor {
my $index = shift;
my $color = shift;
return if ($index >= $self->getNumberOfColors);
return if ($index < 0);
return unless (defined $index);
return unless (defined $color);
return undef if ($index >= $self->getNumberOfColors);
return undef if ($index < 0);
return undef unless (defined $index);
return undef unless (defined $color);
$color->save;
@ -484,7 +484,7 @@ sub setPaletteIndex {
my $self = shift;
my $index = shift;
return unless (defined $index);
return undef unless (defined $index);
$index = ($self->getNumberOfColors - 1) if ($index >= $self->getNumberOfColors);
$index = 0 if ($index < 0);