about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchThread.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-10-05 23:47:25 +0000
committerEric Wong <e@80x24.org>2016-10-05 23:53:32 +0000
commit465d6b11e0bc800e45057bef89df37f265ecd5c0 (patch)
treecd99c7d8ca0c72fa0f441daa864175f0a33125fa /lib/PublicInbox/SearchThread.pm
parenta01b6d3b95b272b494dc07d932e015ada9dfdb05 (diff)
downloadpublic-inbox-465d6b11e0bc800e45057bef89df37f265ecd5c0.tar.gz
It is pointless to increment when setting a true value is
simpler as there is no need to read before writing.
Diffstat (limited to 'lib/PublicInbox/SearchThread.pm')
-rw-r--r--lib/PublicInbox/SearchThread.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/SearchThread.pm b/lib/PublicInbox/SearchThread.pm
index dad783ef..ba31f432 100644
--- a/lib/PublicInbox/SearchThread.pm
+++ b/lib/PublicInbox/SearchThread.pm
@@ -179,7 +179,7 @@ sub recurse_down {
         my %seen;
         my @q = ($self);
         while (my $cont = shift @q) {
-                $seen{$cont}++;
+                $seen{$cont} = 1;
                 $callback->($cont);
 
                 if (my $next = $cont->{next}) {
@@ -209,7 +209,7 @@ sub order_children {
                 push @visited, $walk;
 
                 # spot/break loops
-                $seen{$walk}++;
+                $seen{$walk} = 1;
 
                 my $child = $walk->{child};
                 if ($child && $seen{$child}) {