Skip to content

Commit

Permalink
Remove type cast as mxe(mingw32) compiler complains about useless-cast (
Browse files Browse the repository at this point in the history
fmtlib#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));
"""
  • Loading branch information
vinayyadav3016 committed Sep 5, 2023
1 parent f5be4a8 commit fac60bd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/fmt/format-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fac60bd

Please sign in to comment.