Visual Studio 2017: warning C4456: declaration of 'result' hides previous local declaration

This commit is contained in:
Ivan Shynkarenka 2019-03-11 10:18:06 +03:00 committed by Victor Zverovich
parent ebec00138b
commit e06523361d

View File

@ -489,9 +489,9 @@ digits::result grisu2_gen_digits(fp value, uint64_t error, int& exp,
// The fractional part of scaled value (p2 in Grisu) c = value % one.
uint64_t fractional = value.f & (one.f - 1);
exp = count_digits(integral); // kappa in Grisu.
auto result = handler.on_start(data::POWERS_OF_10_64[exp] << -one.e, value.f,
auto result1 = handler.on_start(data::POWERS_OF_10_64[exp] << -one.e, value.f,
error, exp);
if (result != digits::more) return result;
if (result1 != digits::more) return result1;
// Generate digits for the integral part. This can produce up to 10 digits.
do {
uint32_t digit = 0;
@ -544,10 +544,10 @@ digits::result grisu2_gen_digits(fp value, uint64_t error, int& exp,
--exp;
uint64_t remainder =
(static_cast<uint64_t>(integral) << -one.e) + fractional;
auto result = handler.on_digit(static_cast<char>('0' + digit),
auto result2 = handler.on_digit(static_cast<char>('0' + digit),
data::POWERS_OF_10_64[exp] << -one.e, remainder,
error, exp, true);
if (result != digits::more) return result;
if (result2 != digits::more) return result2;
} while (exp > 0);
// Generate digits for the fractional part.
for (;;) {
@ -557,8 +557,8 @@ digits::result grisu2_gen_digits(fp value, uint64_t error, int& exp,
static_cast<char>('0' + static_cast<char>(fractional >> -one.e));
fractional &= one.f - 1;
--exp;
auto result = handler.on_digit(digit, one.f, fractional, error, exp, false);
if (result != digits::more) return result;
auto result3 = handler.on_digit(digit, one.f, fractional, error, exp, false);
if (result3 != digits::more) return result3;
}
}