From: Steve Hancock Date: Mon, 8 Jan 2024 01:52:50 +0000 (-0800) Subject: small optimization - avoid storing an undef X-Git-Tag: 20230912.13~14 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ca6d724de707b994d3051d02f082024d5617a724;p=perltidy.git small optimization - avoid storing an undef --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 3f49f9c7..85900d2f 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -29389,8 +29389,9 @@ sub convey_batch_to_vertical_aligner { # resync_lines_and_tokens for related coding. Note that # '$batch_CODE_type' is the code type of the line to which the ending # token belongs. - $rvao_args->{Kend} = - $batch_CODE_type && $batch_CODE_type ne 'VER' ? undef : $Kend; + if ( !$batch_CODE_type || $batch_CODE_type eq 'VER' ) { + $rvao_args->{Kend} = $Kend; + } # --------------------------------------------- # get the vertical alignment info for this line