Skip to content

Commit 4f82944

Browse files
committed
Remove branch from return condition
1 parent 46760e6 commit 4f82944

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/boost/decimal/detail/add_impl.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ constexpr auto add_impl(const T& lhs, const T& rhs) noexcept -> ReturnType
8282
big_lhs += 9U;
8383
--lhs_exp;
8484
}
85+
86+
return ReturnType{big_lhs, lhs_exp, lhs.isneg()};
8587
}
8688
else
8789
{
@@ -93,11 +95,9 @@ constexpr auto add_impl(const T& lhs, const T& rhs) noexcept -> ReturnType
9395
big_rhs += 9U;
9496
--rhs_exp;
9597
}
96-
}
9798

98-
return use_lhs ?
99-
ReturnType{big_lhs, lhs_exp, lhs.isneg()} :
100-
ReturnType{big_rhs, rhs_exp, rhs.isneg()};
99+
return ReturnType{big_rhs, rhs_exp, rhs.isneg()};
100+
}
101101
}
102102
else
103103
{

0 commit comments

Comments
 (0)