From: Steve Hancock Date: Tue, 6 Sep 2022 00:40:46 +0000 (-0700) Subject: small optimization X-Git-Tag: 20220613.05~12 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1e8a8d35cead3b38f73a5d9cc93cdabad11eb5c3;p=perltidy.git small optimization --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index b3e27312..4670a7bc 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -14727,20 +14727,15 @@ EOM return if ( $max_index_to_go < 0 ); - $self->set_lp_indentation() - if ($rOpts_line_up_parentheses); + if ($rOpts_line_up_parentheses) { + $self->set_lp_indentation(); + } - #---------------------------- + #-------------------------------------------------- # Shortcut for block comments - #---------------------------- - if ( - $max_index_to_go == 0 - && $types_to_go[0] eq '#' - - # this shortcut does not work for -lp yet - && !$rOpts_line_up_parentheses - ) - { + # Note that this shortcut does not work for -lp yet + #-------------------------------------------------- + elsif ( $max_index_to_go == 0 && $types_to_go[0] eq '#' ) { my $ibeg = 0; $this_batch->[_ri_first_] = [$ibeg]; $this_batch->[_ri_last_] = [$ibeg];