summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-08-08 11:23:31 -0600
committerKarl Williamson <khw@cpan.org>2018-08-09 11:23:15 -0600
commitfdf55d20c1a06df31bf5b997c636e75162bff790 (patch)
tree77286a6ff34e0b76edeb87058f3b0ecca61c23f8 /numeric.c
parent19c1206df85bde60bc9fb5bea2e6c245ceeb9759 (diff)
downloadperl-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/numeric.c b/numeric.c
index 2c520ab700..486aa1c6b7 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();
}