Remove type cast as mxe(mingw32) compiler complains about useless-cast (#3624)

Remove type cast as mxe(mingw32) compiler complains about useless-cast
when FMT_PEDANTIC && FMT_WERROR options are enabled
"""
error: useless cast to type 'class fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char> >' [-Werror=useless-cast]
 1449 |                      basic_format_args<buffer_context<char>>(args));
"""
This commit is contained in:
Vinay Yadav 2023-09-05 20:07:27 +05:30 committed by GitHub
parent f5be4a8a9a
commit fac60bd4f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1445,8 +1445,7 @@ FMT_FUNC bool write_console(std::FILE* f, string_view text) {
// Print assuming legacy (non-Unicode) encoding.
FMT_FUNC void vprint_mojibake(std::FILE* f, string_view fmt, format_args args) {
auto buffer = memory_buffer();
detail::vformat_to(buffer, fmt,
basic_format_args<buffer_context<char>>(args));
detail::vformat_to(buffer, fmt, args);
fwrite_fully(buffer.data(), 1, buffer.size(), f);
}
#endif