projects
/
public-inbox.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
465d6b1
)
thread: order_children no longer cares about depth
author
Eric Wong <e@80x24.org>
Wed, 5 Oct 2016 23:47:26 +0000 (23:47 +0000)
committer
Eric Wong <e@80x24.org>
Wed, 5 Oct 2016 23:53:33 +0000 (23:53 +0000)
We never use the depth anywhere in this sub
lib/PublicInbox/SearchThread.pm
patch
|
blob
|
history
diff --git
a/lib/PublicInbox/SearchThread.pm
b/lib/PublicInbox/SearchThread.pm
index ba31f4322ae851c23a65fdfe6e96c0a42f28b601..2e7b79a0faaaa0d685b98272983114013a47532b 100644
(file)
--- 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;
}
}