Skip to content

Commit

Permalink
remove leftover from merge
Browse files Browse the repository at this point in the history
pauldreik committed Jun 14, 2019
1 parent 1ae3128 commit fd72b9a
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions include/fmt/chrono.h
Original file line number Diff line number Diff line change
@@ -398,20 +398,6 @@ inline bool isfinite(T value) {
return std::isfinite(value);
}

//paul - is this fcn unused?
template <typename T> inline int to_int(T value) {
FMT_ASSERT(!isnan(value), "nan to int conversion is UB");
if (std::numeric_limits<T>::is_signed) {
// this covers both float and integers
FMT_ASSERT(value >= (std::numeric_limits<int>::min)(),
"value is too small to fit in an int");
}
FMT_ASSERT(value <= (std::numeric_limits<int>::max)(),
"value is too large to fit in an int");

return static_cast<int>(value);
}

// Convers value to int and checks that it's in the range [0, upper).
template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
inline int to_nonnegative_int(T value, int upper) {

0 comments on commit fd72b9a

Please sign in to comment.