Fix some compilation issues on modern macOS systems (#6709)

* Fix various compiler warnings generated by Apple clang 15, and workaround some boost 1.8 bugs

* Fix formatting.
This commit is contained in:
Daniel Patterson
2023-10-12 14:04:39 -07:00
committed by GitHub
parent b437ce5b33
commit 31e31a63d0
5 changed files with 29 additions and 18 deletions
+4 -2
View File
@@ -184,7 +184,8 @@ double getLength(iterator_type begin, const iterator_type end, BinaryOperation o
return false;
};
// side-effect find adding up distances
std::adjacent_find(begin, end, functor);
// Ignore return value, we are only interested in the side-effect
[[maybe_unused]] auto _ = std::adjacent_find(begin, end, functor);
return result;
}
@@ -202,7 +203,8 @@ findClosestDistance(const Coordinate coordinate, const iterator_type begin, cons
return false;
};
std::adjacent_find(begin, end, compute_minimum_distance);
// Ignore return value, we are only interested in the side-effect
[[maybe_unused]] auto _ = std::adjacent_find(begin, end, compute_minimum_distance);
return current_min;
}