diff options
author | Karl Williamson <khw@cpan.org> | 2018-08-08 11:23:31 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-08-09 11:23:15 -0600 |
commit | fdf55d20c1a06df31bf5b997c636e75162bff790 (patch) | |
tree | 77286a6ff34e0b76edeb87058f3b0ecca61c23f8 /numeric.c | |
parent | 19c1206df85bde60bc9fb5bea2e6c245ceeb9759 (diff) | |
download | perl-fdf55d20c1a06df31bf5b997c636e75162bff790.tar.gz |
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 }
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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(); } |