mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 06:21:00 +00:00
Get rid of conversion warning in gcc-4.8 (#854)
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]
This commit is contained in:
parent
6ffc828a79
commit
8cbfb6e727
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user