numeric.c: Move some code around
authorKarl Williamson <khw@cpan.org>
Wed, 8 Aug 2018 17:23:31 +0000 (11:23 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 9 Aug 2018 17:23:15 +0000 (11:23 -0600)
For readability, this changes

if (f00) {  MANY LINES } else { FEW LINES }

to

if (! f00) { FEW LINES } else { MANY LINES }

numeric.c

index 2c520ab..486aa1c 100644 (file)
--- 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();
     }