From e69f72fc8670a6cb1330f6018b4431eb38fd1ac0 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 30 Jun 2021 11:33:08 -0600 Subject: [PATCH] regcharclass.pl: Rmv unused variable --- regcharclass.h | 2 +- regen/regcharclass.pl | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/regcharclass.h b/regcharclass.h index 4643440d3968..cc00d0395461 100644 --- a/regcharclass.h +++ b/regcharclass.h @@ -3765,6 +3765,6 @@ * 696e706fddd3ce8cd48c7ea91caf4c9edf5c296432d320aa7b78631f69aa9eac lib/unicore/mktables * 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version * 0a6b5ab33bb1026531f816efe81aea1a8ffcd34a27cbea37dd6a70a63d73c844 regen/charset_translations.pl - * 1c0276b3b54a2da17de7b32dd92f3c996ab859307e2fd504046e900d05417270 regen/regcharclass.pl + * 4e40347fc698289817c20aaedd624d4c0fea578152ae1577a77177d9712af7a2 regen/regcharclass.pl * b2f896452d2b30da3e04800f478c60c1fd0b03d6b668689b020f1e3cf1f1cdd9 regen/regcharclass_multi_char_folds.pl * ex: set ro: */ diff --git a/regen/regcharclass.pl b/regen/regcharclass.pl index 9fc939fdeff2..ae587d99524e 100755 --- a/regen/regcharclass.pl +++ b/regen/regcharclass.pl @@ -1177,7 +1177,6 @@ sub _cond_as_str { # Here, there was no entire-class optimization that was clearly better # than doing things by ranges. Look at each range. - my $range_count_extra = 0; for (my $i = $loop_start; $i < $loop_end; $i++) { if (! ref $ranges[$i]) { # Trivial case: no range $ranges[$i] = $self->val_fmt($ranges[$i]) . " == $test"; @@ -1198,7 +1197,7 @@ sub _cond_as_str { # ranges (some of which could be cut down by using a mask for just it). # We return whichever method uses the fewest branches. return "( " - . join( " || ", (@masks && @masks < @ranges + $range_count_extra) + . join( " || ", (@masks && @masks < @ranges) ? @masks : @ranges) . " )";