Skip to content

Commit

Permalink
Get rid of conversion warning in gcc-4.8 (#854)
Browse files Browse the repository at this point in the history
Get rid of conversion warning in gcc-4.8 

Get rid of the following warning:
conversion to ‘int’ from ‘long unsigned int’ may alter its value [-Werror=conversion]
  • Loading branch information
medithe authored and vitaut committed Sep 11, 2018
1 parent 6ffc828 commit 8cbfb6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/format-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ class fp {
explicit fp(Double d) {
// Assume double is in the format [sign][exponent][significand].
typedef std::numeric_limits<Double> limits;
const int double_size = sizeof(Double) * char_size;
const int double_size = static_cast<int>(sizeof(Double) * char_size);
const int exponent_size =
double_size - double_significand_size - 1; // -1 for sign
const uint64_t significand_mask = implicit_bit - 1;
Expand Down

0 comments on commit 8cbfb6e

Please sign in to comment.