summaryrefslogtreecommitdiff
path: root/lib/GridFiller/Chooser
diff options
context:
space:
mode:
Diffstat (limited to 'lib/GridFiller/Chooser')
-rw-r--r--lib/GridFiller/Chooser/Random.pm4
-rw-r--r--lib/GridFiller/Chooser/Smarter.pm2
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/GridFiller/Chooser/Random.pm b/lib/GridFiller/Chooser/Random.pm
index 7fefbf6..f949c4d 100644
--- a/lib/GridFiller/Chooser/Random.pm
+++ b/lib/GridFiller/Chooser/Random.pm
@@ -35,7 +35,7 @@ sub _find_place_horiz {
for my $row (0..$rows-1) {
$col = $self->_find_in_row($row,$length);
- return ($col,$row,$HORIZONTAL) if defined $col;
+ return (0,$col,$row,$HORIZONTAL) if defined $col;
}
return;
}
@@ -48,7 +48,7 @@ sub _find_place_vert {
for my $col (0..$cols-1) {
$row = $self->_find_in_col($col,$length);
- return ($col,$row,$VERTICAL) if defined $row;
+ return (0,$col,$row,$VERTICAL) if defined $row;
}
return;
}
diff --git a/lib/GridFiller/Chooser/Smarter.pm b/lib/GridFiller/Chooser/Smarter.pm
index 43ad530..0abd088 100644
--- a/lib/GridFiller/Chooser/Smarter.pm
+++ b/lib/GridFiller/Chooser/Smarter.pm
@@ -27,8 +27,6 @@ sub find_place_for {
my $ret = maxfirst @candidates;
- shift @$ret;
-
return @$ret;
}