]> git.donarmstrong.com Git - perltidy.git/commitdiff
minor optimization
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 15 Aug 2023 00:10:43 +0000 (17:10 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 15 Aug 2023 00:10:43 +0000 (17:10 -0700)
lib/Perl/Tidy/Tokenizer.pm

index 2f7c471aa9f0e8ff6da439089471fdeb017df595..d46e9b20498dfe54cf3f38ecaa61e8e69845c9b1 100644 (file)
@@ -5722,6 +5722,7 @@ EOM
             foreach my $i ( @{$routput_token_list} ) {
                 my $numc = $rtoken_map->[$i] - $offset;
                 push( @tokens, substr( $input_line, $offset, $numc ) );
+                $offset += $numc;
 
                 if ( DEVEL_MODE && $numc <= 0 ) {
 
@@ -5729,7 +5730,6 @@ EOM
                     $self->Fault(
                         "number of characters is '$numc' but should be >0\n");
                 }
-                $offset = $rtoken_map->[$i];
             }
 
             # Form and store the final token of this line