From e099c292b05be39f42e64a27336e322eaf2218cb Mon Sep 17 00:00:00 2001 From: Fabian Date: Sun, 6 Aug 2023 19:08:06 +0200 Subject: [PATCH] Use std::abs instead of abs() from C standard library (#369) abs() from C standard library operates on integers, which is almost certainly not what was intended. --- include/common/polylib.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/common/polylib.hh b/include/common/polylib.hh index 73657156..51272dcf 100644 --- a/include/common/polylib.hh +++ b/include/common/polylib.hh @@ -1239,8 +1239,8 @@ public: { double worldextent = 0; for (int i = 0; i < 3; ++i) { - worldextent = max(worldextent, abs(bbox.maxs()[i])); - worldextent = max(worldextent, abs(bbox.mins()[i])); + worldextent = std::max(worldextent, std::abs(bbox.maxs()[i])); + worldextent = std::max(worldextent, std::abs(bbox.mins()[i])); } worldextent += 1;