diff options
-rw-r--r-- | sigmodr/widgets/mapeditor/WorldMapPlacement.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sigmodr/widgets/mapeditor/WorldMapPlacement.cpp b/sigmodr/widgets/mapeditor/WorldMapPlacement.cpp index 369142bd..42911d1f 100644 --- a/sigmodr/widgets/mapeditor/WorldMapPlacement.cpp +++ b/sigmodr/widgets/mapeditor/WorldMapPlacement.cpp @@ -50,6 +50,8 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(Resolutions) typedef QPair<Resolutions, QPoint> NextTarget; typedef QMap<QPoint, NextTarget> CollisionInfo; +static const QPoint dummyPoint = QPoint(INT_MAX, INT_MAX); + static bool operator<(const QPoint& point1, const QPoint& point2) { if (point1.y() == point2.y()) @@ -159,7 +161,7 @@ static CollisionInfo findCollisions(const QPolygon& polygon1, const QPolygon& po static QPoint findOuterPoint(const QPolygon& polygon) { - QPoint curPoint(INT_MAX, INT_MAX); + QPoint curPoint = dummyPoint; foreach (const QPoint& point, polygon) { if (point < curPoint) |