diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2009-05-23 00:47:52 -0400 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2009-05-23 00:47:52 -0400 |
commit | 2494e4156985bbf15b317f5b0813207683aff9c1 (patch) | |
tree | a7e47c89abefaa20267b1be0c3fa49c4b15a02fa | |
parent | 3f7d12d9a17d540a9ef74c46a03432a0285ab0c8 (diff) | |
download | sigen-2494e4156985bbf15b317f5b0813207683aff9c1.tar.gz sigen-2494e4156985bbf15b317f5b0813207683aff9c1.tar.xz sigen-2494e4156985bbf15b317f5b0813207683aff9c1.zip |
Add a define for the dummy point
-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) |