From d6dbfdde93936015eb19e78b9cadfe952192a5ac Mon Sep 17 00:00:00 2001 From: Daniela Engert Date: Sat, 1 Dec 2018 17:57:34 +0100 Subject: [PATCH] Make return type of basic_format_args::max_size() consistent. This squashes nasty narrowing conversion warnings. --- include/fmt/core.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index b532fa83e4e3..882953b220eb 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1279,9 +1279,10 @@ class basic_format_args { return arg; } - unsigned max_size() const { + size_type max_size() const { unsigned long long max_packed = internal::max_packed_args; - return is_packed() ? max_packed : types_ & ~internal::is_unpacked_bit; + return static_cast( + is_packed() ? max_packed : types_ & ~internal::is_unpacked_bit); } };