Skip to content

Commit

Permalink
Explicitly cast the result
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed Mar 17, 2023
1 parent b8fb413 commit 5284fb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/boost/math/special_functions/round.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ inline ResultType float_to_int(T x)
return (std::numeric_limits<ResultType>::max)();
}

return y;
return static_cast<ResultType>(y);
}

template <typename T, typename TargetType>
Expand Down

0 comments on commit 5284fb7

Please sign in to comment.