Skip to content

Commit

Permalink
Fix a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Jun 23, 2019
1 parent af83192 commit 29ef7d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ template <typename Rep, typename Period,
FMT_ENABLE_IF(std::is_floating_point<Rep>::value)>
inline std::chrono::duration<Rep, std::milli> get_milliseconds(
std::chrono::duration<Rep, Period> d) {
return std::chrono::duration<Rep, std::milli>(
mod(d.count() * Period::num / Period::den * 1000, 1000));
auto ms = 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>
Expand Down

0 comments on commit 29ef7d3

Please sign in to comment.