From ca6d724de707b994d3051d02f082024d5617a724 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sun, 7 Jan 2024 17:52:50 -0800 Subject: [PATCH] small optimization - avoid storing an undef --- lib/Perl/Tidy/Formatter.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.5