summaryrefslogtreecommitdiffstats
path: root/src/libavoid/shape.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libavoid/shape.cpp')
-rw-r--r--src/libavoid/shape.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libavoid/shape.cpp b/src/libavoid/shape.cpp
index 2b241b728..c0ff2f6e8 100644
--- a/src/libavoid/shape.cpp
+++ b/src/libavoid/shape.cpp
@@ -206,10 +206,10 @@ void ShapeRef::boundingBox(BBox& bbox)
{
const Point& p = _poly.ps[i];
- a.x = (p.x < a.x) ? p.x : a.x;
- a.y = (p.y < a.y) ? p.y : a.y;
- b.x = (p.x > b.x) ? p.x : b.x;
- b.y = (p.y > b.y) ? p.y : b.y;
+ a.x = std::min(p.x, a.x);
+ a.y = std::min(p.y, a.y);
+ b.x = std::max(p.x, b.x);
+ b.y = std::max(p.y, b.y);
}
}