Fix a warning

This commit is contained in:
Victor Zverovich 2019-06-23 11:09:15 -07:00
parent af83192d79
commit 29ef7d31e4

View File

@ -433,8 +433,8 @@ template <typename Rep, typename Period,
FMT_ENABLE_IF(std::is_floating_point<Rep>::value)> FMT_ENABLE_IF(std::is_floating_point<Rep>::value)>
inline std::chrono::duration<Rep, std::milli> get_milliseconds( inline std::chrono::duration<Rep, std::milli> get_milliseconds(
std::chrono::duration<Rep, Period> d) { std::chrono::duration<Rep, Period> d) {
return std::chrono::duration<Rep, std::milli>( auto ms = mod(d.count() * Period::num / Period::den * 1000, 1000);
mod(d.count() * Period::num / Period::den * 1000, 1000)); return std::chrono::duration<Rep, std::milli>(static_cast<Rep>(ms));
} }
template <typename Rep, typename OutputIt> template <typename Rep, typename OutputIt>