From 924d26113e10f0645f9b5e957f4f7818a7e6d79b Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Sat, 15 Dec 2018 12:45:26 -0500 Subject: [PATCH] Fix sign conversion --- include/fmt/chrono.h | 2 +- include/fmt/time.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 65f5b5a5..a964ea93 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -377,7 +377,7 @@ struct formatter, Char> { -> decltype(ctx.begin()) { auto begin = ctx.begin(), end = ctx.end(); end = parse_chrono_format(begin, end, internal::chrono_format_checker()); - format_str = basic_string_view(&*begin, end - begin); + format_str = basic_string_view(&*begin, static_cast(end - begin)); return end; } diff --git a/include/fmt/time.h b/include/fmt/time.h index fbd3c60a..da4edd8b 100644 --- a/include/fmt/time.h +++ b/include/fmt/time.h @@ -122,7 +122,7 @@ struct formatter { auto end = it; while (end != ctx.end() && *end != '}') ++end; - tm_format.reserve(end - it + 1); + tm_format.reserve(static_cast(end - it + 1)); tm_format.append(it, end); tm_format.push_back('\0'); return end;