diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2009-04-22 16:58:40 -0400 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2009-04-22 16:58:40 -0400 |
| commit | ff59bf74f2e69c385f25ce2931507dbbbd6bebb2 (patch) | |
| tree | ac413b67fd6fb9df9f25d979d45f633160fe5fed | |
| parent | 9d968ec366cf2dfa9e7a49d10cdaa457c0d318ab (diff) | |
| download | sigen-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.cpp | 4 |
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) |
