From 0412f55abd34d90e4efe0b28217d79fa8319834f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 5 Oct 2016 23:47:26 +0000 Subject: thread: order_children no longer cares about depth We never use the depth anywhere in this sub --- lib/PublicInbox/SearchThread.pm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/PublicInbox/SearchThread.pm b/lib/PublicInbox/SearchThread.pm index ba31f432..2e7b79a0 100644 --- a/lib/PublicInbox/SearchThread.pm +++ b/lib/PublicInbox/SearchThread.pm @@ -203,7 +203,6 @@ sub order_children { my ($walk, $ordersub) = @_; my %seen; - my $depth = 0; my @visited; while ($walk) { push @visited, $walk; @@ -222,17 +221,13 @@ sub order_children { } # go down, or across - if ($child) { - $next = $child; - ++$depth; - } + $next = $child if $child; # no next? look up if (!$next) { my $up = $walk; while ($up && !$next) { $up = $up->{parent}; - --$depth; $next = $up->{next} if $up; } } -- cgit v1.2.3-24-ge0c7