This moves a variable to clean things up.

This commit is contained in:
Daniel Lemire 2020-11-02 14:44:24 -05:00
parent 1f6873e931
commit 8214b37c86

View file

@ -1174,7 +1174,6 @@ really_inline bool parse_number(const char *p, double *outDouble) {
}
int digit_count =
int(p - start_digits - 1); // used later to guard against overflows
int64_t exp_number = 0; // exponential part
if (('e' == *p) || ('E' == *p)) {
++p;
bool neg_exp = false;
@ -1188,7 +1187,7 @@ really_inline bool parse_number(const char *p, double *outDouble) {
return false;
}
unsigned char digit = *p - '0';
exp_number = digit;
int64_t exp_number = digit;
p++;
if (is_integer(*p)) {
digit = *p - '0';