]> git.donarmstrong.com Git - perltidy.git/commitdiff
minor optimization
authorSteve Hancock <perltidy@users.sourceforge.net>
Fri, 2 Feb 2024 01:14:19 +0000 (17:14 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Fri, 2 Feb 2024 01:14:19 +0000 (17:14 -0800)
lib/Perl/Tidy/Formatter.pm

index 74140f304e4f426b38852ab654c4a871cb3838a2..03cb6b7ef2f63522ecf53d38f24b6476f708076c 100644 (file)
@@ -20257,16 +20257,15 @@ EOM
 
             # gather info needed by sub break_long_lines
             if ( $type_sequence_to_go[$i] ) {
-                my $seqno = $type_sequence_to_go[$i];
-                my $token = $tokens_to_go[$i];
 
                 # remember indexes of any tokens controlling xci
                 # in this batch. This list is needed by sub undo_ci.
+                my $seqno = $type_sequence_to_go[$i];
                 if ( $self->[_ris_seqno_controlling_ci_]->{$seqno} ) {
                     push @ix_seqno_controlling_ci, $i;
                 }
 
-                if ( $is_opening_sequence_token{$token} ) {
+                if ( $is_opening_sequence_token{ $tokens_to_go[$i] } ) {
                     if ( $self->[_rbreak_container_]->{$seqno} ) {
                         $self->set_forced_breakpoint($i);
                     }