mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-02 11:28:20 +00:00
Fix a shadowing warning (#1658)
This commit is contained in:
parent
e2ef12a8c0
commit
3c114d091b
@ -504,10 +504,10 @@ OutputIt basic_printf_context<OutputIt, Char>::format() {
|
||||
format_arg arg = get_arg(arg_index);
|
||||
if (specs.precision >= 0 && arg.type() == internal::type::cstring_type) {
|
||||
auto str = visit_format_arg(internal::get_cstring<Char>(), arg);
|
||||
auto end = str + specs.precision;
|
||||
auto nul = std::find(str, end, Char());
|
||||
auto str_end = str + specs.precision;
|
||||
auto nul = std::find(str, str_end, Char());
|
||||
arg = internal::make_arg<basic_printf_context>(basic_string_view<Char>(
|
||||
str, nul != end ? nul - str : specs.precision));
|
||||
str, nul != str_end ? nul - str : specs.precision));
|
||||
}
|
||||
if (specs.alt && visit_format_arg(internal::is_zero_int(), arg))
|
||||
specs.alt = false;
|
||||
|
Loading…
Reference in New Issue
Block a user