[Tile-serving] [openstreetmap/osm2pgsql] Add operators to make points sortable (PR #1925)
Paul Norman
notifications at github.com
Thu Feb 23 23:36:47 UTC 2023
@pnorman requested changes on this pull request.
> @@ -84,6 +84,23 @@ class point_t
return !(a == b);
}
+ /// Give points an (arbitrary) order.
+ [[nodiscard]] constexpr friend bool operator<(point_t a, point_t b) noexcept
+ {
+ if (a.x() == b.x()) {
+ return a.y() < b.y();
This branch is not tested - the test coverage has two points with equal y, but not ones with equal x.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1925#pullrequestreview-1312299050
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/pull/1925/review/1312299050 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230223/0bc1bc92/attachment.htm>
More information about the Tile-serving
mailing list