From fac60bd4f5e54d1912480ca4da3626d49ddf6ff1 Mon Sep 17 00:00:00 2001 From: Vinay Yadav Date: Tue, 5 Sep 2023 20:07:27 +0530 Subject: [PATCH] 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 >' [-Werror=useless-cast] 1449 | basic_format_args>(args)); """ --- include/fmt/format-inl.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index dac2d437a41a..553e7ce88d4b 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -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>(args)); + detail::vformat_to(buffer, fmt, args); fwrite_fully(buffer.data(), 1, buffer.size(), f); } #endif