printf.h fixed to compile clean - need to check whether this is the right

thing to do
This commit is contained in:
Andreas Schönle 2017-04-27 23:35:51 +02:00
parent d49f206183
commit 18368ca5ac

View File

@ -336,7 +336,7 @@ class PrintfFormatter : private internal::FormatterBase {
: FormatterBase(al), writer_(w) {} : FormatterBase(al), writer_(w) {}
/** Formats stored arguments and writes the output to the writer. */ /** Formats stored arguments and writes the output to the writer. */
FMT_API void format(BasicCStringRef<Char> format_str); void format(BasicCStringRef<Char> format_str);
}; };
template <typename Char, typename AF> template <typename Char, typename AF>
@ -495,7 +495,9 @@ void PrintfFormatter<Char, AF>::format(BasicCStringRef<Char> format_str) {
if (spec.type_ == 's') { if (spec.type_ == 's') {
// set the format type to the default if 's' is specified // set the format type to the default if 's' is specified
spec.type_ = internal::DefaultType().visit(arg);
// Avoid warning for wchar_t
spec.type_ = char(internal::DefaultType().visit(arg));
} }
if (arg.type <= Arg::LAST_INTEGER_TYPE) { if (arg.type <= Arg::LAST_INTEGER_TYPE) {