]> git.donarmstrong.com Git - perltidy.git/commitdiff
small optimization
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 6 Sep 2022 00:40:46 +0000 (17:40 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 6 Sep 2022 00:40:46 +0000 (17:40 -0700)
lib/Perl/Tidy/Formatter.pm

index b3e2731274ae07f1dc5c45d22e19ab767879a709..4670a7bc0bb8e67edf175c34dcf4d9d41a7e22ac 100644 (file)
@@ -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];