From: Karl Williamson Date: Wed, 8 Aug 2018 17:23:31 +0000 (-0600) Subject: numeric.c: Move some code around X-Git-Tag: v5.29.2~37 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/fdf55d20c1a06df31bf5b997c636e75162bff790 numeric.c: Move some code around For readability, this changes if (f00) { MANY LINES } else { FEW LINES } to if (! f00) { FEW LINES } else { MANY LINES } --- diff --git a/numeric.c b/numeric.c index 2c520ab..486aa1c 100644 --- a/numeric.c +++ b/numeric.c @@ -1267,7 +1267,10 @@ Perl_my_atof(pTHX_ const char* s) { DECLARATION_FOR_LC_NUMERIC_MANIPULATION; STORE_LC_NUMERIC_SET_TO_NEEDED(); - if (PL_numeric_radix_sv && IN_LC(LC_NUMERIC)) { + if (! (PL_numeric_radix_sv && IN_LC(LC_NUMERIC))) { + ATOF(s,x); + } + else { /* Look through the string for the first thing that looks like a * decimal point: either the value in the current locale or the @@ -1294,9 +1297,6 @@ Perl_my_atof(pTHX_ const char* s) SET_NUMERIC_UNDERLYING(); } } - else { - ATOF(s,x); - } RESTORE_LC_NUMERIC(); }