Fix some warnings (#1667)

* Fix sign-conversion warning

* Add missing "extern template" declarations for non-header-only build

* Use typed enums to fix Wsigned-enum-bitfield warnings

* Consolidate FMT_HEADER_ONLY code
This commit is contained in:
peterbell10 authored and GitHub committed 2020-05-07 06:14:07 -07:00
1 parent 1c86a99e8f
commit 44639b11fe
2 files changed
+25 -3

No files matched your search

+1 -1
View File
@@ -507,7 +507,7 @@ OutputIt basic_printf_context<OutputIt, Char>::format() {
auto str_end = str + specs.precision;
auto nul = std::find(str, str_end, Char());
arg = internal::make_arg<basic_printf_context>(basic_string_view<Char>(
str, nul != str_end ? nul - str : specs.precision));
str, internal::to_unsigned(nul != str_end ? nul - str : specs.precision)));
}
if (specs.alt && visit_format_arg(internal::is_zero_int(), arg))
specs.alt = false;