Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio 2017: warning C4456: declaration of 'result' hides prev… #1075

Merged
merged 1 commit into from
Mar 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions include/fmt/format-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 (;;) {
Expand All @@ -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;
}
}

Expand Down