Skip to content

Commit

Permalink
Fix compiler warning about narrowing
Browse files Browse the repository at this point in the history
Signed-off-by: Daniela Engert <dani@ngrt.de>
  • Loading branch information
DanielaE authored and vitaut committed Apr 27, 2018
1 parent df1ba52 commit 0efc8a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ fp operator*(fp x, fp y);
// alpha <= c_k.e + e <= alpha + 3.
inline int compute_cached_power_index(int e, int alpha) {
constexpr double one_over_log2_10 = 0.30102999566398114; // 1 / log2(10)
return std::ceil((alpha - e + 63) * one_over_log2_10);
return static_cast<int>(std::ceil((alpha - e + 63) * one_over_log2_10));
}

template <typename Allocator>
Expand Down

0 comments on commit 0efc8a1

Please sign in to comment.