Remove warning in format.h when compiling with gcc and -Wshadow
build/_deps/fmt-src/include/fmt/format.h: In member function ‘decltype (ctx.out()) fmt::v6::formatter<fmt::v6::bytes>::format(fmt::v6::bytes, FormatContext&)’: build/_deps/fmt-src/include/fmt/format.h:3251:58: error: declaration of ‘writer’ shadows a global declaration [-Werror=shadow] internal::basic_writer<range_type> writer(range_type(ctx.out())); ^~~ build/_deps/fmt-src/include/fmt/format.h:2741:53: note: shadowed declaration is here using writer FMT_DEPRECATED_ALIAS = internal::writer;
This commit is contained in:
parent
538d83fd08
commit
84898b4626
@ -3222,9 +3222,9 @@ template <> struct formatter<bytes> {
|
|||||||
specs_.precision, specs_.precision_ref, ctx);
|
specs_.precision, specs_.precision_ref, ctx);
|
||||||
using range_type =
|
using range_type =
|
||||||
internal::output_range<typename FormatContext::iterator, char>;
|
internal::output_range<typename FormatContext::iterator, char>;
|
||||||
internal::basic_writer<range_type> writer(range_type(ctx.out()));
|
internal::basic_writer<range_type> w(range_type(ctx.out()));
|
||||||
writer.write_bytes(b.data_, specs_);
|
w.write_bytes(b.data_, specs_);
|
||||||
return writer.out();
|
return w.out();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user