Skip to content

Commit

Permalink
Use --/++$i instead of $i = nqp::add/sub_i($i,1)
Browse files Browse the repository at this point in the history
Kernel related
  • Loading branch information
lizmat committed Feb 16, 2022
1 parent 11494f9 commit db277ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.c/Kernel.pm6
Expand Up @@ -128,7 +128,7 @@ class Kernel does Systemic {
nqp::while(
nqp::islt_i($i, $els),
nqp::bindpos(arr, $i, Signal($i) // Nil),
$i = nqp::add_i($i, 1),
++$i
);
@!signals = |arr;
$!signals-setup = True;
Expand All @@ -150,7 +150,7 @@ class Kernel does Systemic {
my int $i = -1;

nqp::while(
nqp::isgt_i($els, $i = nqp::add_i($i, 1)),
nqp::isgt_i($els,++$i),
($_ := @!signals.AT-POS($i)).defined
&& %!signals-by-Str.ASSIGN-KEY(.Str, nqp::decont($i))
);
Expand Down

0 comments on commit db277ae

Please sign in to comment.