summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-04-22 16:58:40 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-04-22 16:58:40 -0400
commitff59bf74f2e69c385f25ce2931507dbbbd6bebb2 (patch)
treeac413b67fd6fb9df9f25d979d45f633160fe5fed
parent9d968ec366cf2dfa9e7a49d10cdaa457c0d318ab (diff)
downloadsigen-ff59bf74f2e69c385f25ce2931507dbbbd6bebb2.tar.gz
sigen-ff59bf74f2e69c385f25ce2931507dbbbd6bebb2.tar.xz
sigen-ff59bf74f2e69c385f25ce2931507dbbbd6bebb2.zip
Simplify (and fix) conditional when finding the outermost point
-rw-r--r--sigmodr/widgets/mapeditor/WorldMapPlacement.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/sigmodr/widgets/mapeditor/WorldMapPlacement.cpp b/sigmodr/widgets/mapeditor/WorldMapPlacement.cpp
index 18408ce4..f6b8a881 100644
--- a/sigmodr/widgets/mapeditor/WorldMapPlacement.cpp
+++ b/sigmodr/widgets/mapeditor/WorldMapPlacement.cpp
@@ -97,9 +97,7 @@ static CollisionInfo findCollisions(const QPolygon& polygon1, const QPolygon& po
static QPoint findOuterPoint(const QPolygon& polygon)
{
- if (!polygon.isEmpty())
- return QPoint(INT_MAX, INT_MAX);
- QPoint curPoint = polygon[0];
+ QPoint curPoint(INT_MAX, INT_MAX);
foreach (const QPoint& point, polygon)
{
if (point < curPoint)