mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Remove some branches
This commit is contained in:
committed by
Victor Zverovich
parent
8061d9afbe
commit
9bb1605f10
@ -1337,7 +1337,7 @@ template <typename T> decimal_fp<T> to_decimal(T x) noexcept {
|
|||||||
|
|
||||||
if (r < deltai) {
|
if (r < deltai) {
|
||||||
// Exclude the right endpoint if necessary.
|
// Exclude the right endpoint if necessary.
|
||||||
if (r == 0 && z_mul.is_integer && !include_right_endpoint) {
|
if (r == 0 && (z_mul.is_integer & !include_right_endpoint)) {
|
||||||
--ret_value.significand;
|
--ret_value.significand;
|
||||||
r = float_info<T>::big_divisor;
|
r = float_info<T>::big_divisor;
|
||||||
goto small_divisor_case_label;
|
goto small_divisor_case_label;
|
||||||
@ -1389,7 +1389,7 @@ small_divisor_case_label:
|
|||||||
// or equivalently, when y is an integer.
|
// or equivalently, when y is an integer.
|
||||||
if (y_mul.parity != approx_y_parity)
|
if (y_mul.parity != approx_y_parity)
|
||||||
--ret_value.significand;
|
--ret_value.significand;
|
||||||
else if (y_mul.is_integer && ret_value.significand % 2 != 0)
|
else if (y_mul.is_integer & (ret_value.significand % 2 != 0))
|
||||||
--ret_value.significand;
|
--ret_value.significand;
|
||||||
return ret_value;
|
return ret_value;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user