algorithms: format fix

This commit is contained in:
Corentin Le Molgat
2024-11-06 08:01:46 +01:00
parent 5503b47d3a
commit 9fdab677ea

View File

@@ -35,8 +35,8 @@
namespace operations_research {
// Correctly picking the midpoint of two integers in all cases isn't trivial!
template <> inline
int BinarySearchMidpoint(int x, int y) {
template <>
inline int BinarySearchMidpoint(int x, int y) {
if (x > y) std::swap(x, y);
if (x >= 0 || y < 0) return x + (y - x) / 2;
return (x + y) / 2;
@@ -181,8 +181,8 @@ TEST(BinarySearchDeathTest, DiesIfEitherBoundaryConditionViolatedInFastbuild) {
// Note that template specializations must be exactly in the same namespace,
// hence the presence of these tests outside the unnamed namespace.
template <> inline
absl::Time BinarySearchMidpoint(absl::Time x, absl::Time y) {
template <>
inline absl::Time BinarySearchMidpoint(absl::Time x, absl::Time y) {
return x + (y - x) / 2;
}