Skip to content

Commit f900e2c

Browse files
authored
Merge pull request #2295 from joto/update-libosmium
Update included libosmium to version 2.21.0
2 parents 4d6bcb9 + 3161160 commit f900e2c

File tree

199 files changed

+478
-655
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+478
-655
lines changed

contrib/libosmium/README.contrib

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Source: https://github.com/osmcode/libosmium
2-
Revision: v2.20.0
2+
Revision: v2.21.0

contrib/libosmium/include/osmium/area/assembler.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

contrib/libosmium/include/osmium/area/assembler_config.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

contrib/libosmium/include/osmium/area/assembler_legacy.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

contrib/libosmium/include/osmium/area/detail/basic_assembler.hpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111
@@ -70,7 +70,7 @@ namespace osmium {
7070

7171
struct location_to_ring_map {
7272
osmium::Location location;
73-
open_ring_its_type::iterator ring_it{};
73+
open_ring_its_type::iterator ring_it;
7474
bool start{false};
7575

7676
location_to_ring_map(osmium::Location l, open_ring_its_type::iterator r, const bool s) noexcept :
@@ -217,7 +217,7 @@ namespace osmium {
217217
}
218218
}
219219

220-
for (const osmium::Way* way : ways_in_multiple_rings) {
220+
for (const osmium::Way* way : ways_in_multiple_rings) { // NOLINT(bugprone-nondeterministic-pointer-iteration-order)
221221
++m_stats.ways_in_multiple_rings;
222222
if (debug()) {
223223
std::cerr << " Way " << way->id() << " is in multiple rings\n";
@@ -326,7 +326,7 @@ namespace osmium {
326326
const int64_t ay = a.y();
327327
const int64_t by = b.y();
328328
const int64_t ly = end_location.y();
329-
const auto z = (bx - ax) * (ly - ay) - (by - ay) * (lx - ax);
329+
const auto z = ((bx - ax) * (ly - ay)) - ((by - ay) * (lx - ax));
330330
if (debug()) {
331331
std::cerr << " Segment z=" << z << '\n';
332332
}
@@ -353,7 +353,7 @@ namespace osmium {
353353
const int64_t ay = a.y();
354354
const int64_t by = b.y();
355355
const int64_t ly = location.y();
356-
const auto z = (bx - ax) * (ly - ay) - (by - ay) * (lx - ax);
356+
const auto z = ((bx - ax) * (ly - ay)) - ((by - ay) * (lx - ax));
357357

358358
if (z >= 0) {
359359
nesting += segment->is_reverse() ? -1 : 1;
@@ -362,7 +362,7 @@ namespace osmium {
362362
}
363363
if (segment->ring()->is_outer()) {
364364
const double y = static_cast<double>(ay) +
365-
static_cast<double>((by - ay) * (lx - ax)) / static_cast<double>(bx - ax);
365+
(static_cast<double>((by - ay) * (lx - ax)) / static_cast<double>(bx - ax));
366366
if (debug()) {
367367
std::cerr << " Segment belongs to outer ring (y=" << y << " ring=" << *segment->ring() << ")\n";
368368
}
@@ -703,7 +703,7 @@ namespace osmium {
703703

704704
struct candidate {
705705
int64_t sum;
706-
std::vector<std::pair<location_to_ring_map, bool>> rings{};
706+
std::vector<std::pair<location_to_ring_map, bool>> rings;
707707
osmium::Location start_location;
708708
osmium::Location stop_location;
709709

contrib/libosmium/include/osmium/area/detail/basic_assembler_with_tags.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

contrib/libosmium/include/osmium/area/detail/node_ref_segment.hpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111
@@ -75,10 +75,10 @@ namespace osmium {
7575
class NodeRefSegment {
7676

7777
// First node in order described above.
78-
osmium::NodeRef m_first{};
78+
osmium::NodeRef m_first;
7979

8080
// Second node in order described above.
81-
osmium::NodeRef m_second{};
81+
osmium::NodeRef m_second;
8282

8383
// Way this segment was from.
8484
const osmium::Way* m_way = nullptr;
@@ -319,11 +319,11 @@ namespace osmium {
319319

320320
// intersection in a point
321321

322-
const int64_t na = (q1.x - q0.x) * (p0.y - q0.y) -
323-
(q1.y - q0.y) * (p0.x - q0.x);
322+
const int64_t na = ((q1.x - q0.x) * (p0.y - q0.y)) -
323+
((q1.y - q0.y) * (p0.x - q0.x));
324324

325-
const int64_t nb = (p1.x - p0.x) * (p0.y - q0.y) -
326-
(p1.y - p0.y) * (p0.x - q0.x);
325+
const int64_t nb = ((p1.x - p0.x) * (p0.y - q0.y)) -
326+
((p1.y - p0.y) * (p0.x - q0.x));
327327

328328
if ((d > 0 && na >= 0 && na <= d && nb >= 0 && nb <= d) ||
329329
(d < 0 && na <= 0 && na >= d && nb <= 0 && nb >= d)) {

contrib/libosmium/include/osmium/area/detail/proto_ring.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111
@@ -64,11 +64,11 @@ namespace osmium {
6464
private:
6565

6666
// Segments in this ring.
67-
segments_type m_segments{};
67+
segments_type m_segments;
6868

6969
// If this is an outer ring, these point to it's inner rings
7070
// (if any).
71-
std::vector<ProtoRing*> m_inner{};
71+
std::vector<ProtoRing*> m_inner;
7272

7373
// The smallest segment. Will be kept current whenever a new
7474
// segment is added to the ring.

contrib/libosmium/include/osmium/area/detail/segment_list.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111
@@ -84,7 +84,7 @@ namespace osmium {
8484

8585
using slist_type = std::vector<NodeRefSegment>;
8686

87-
slist_type m_segments{};
87+
slist_type m_segments;
8888

8989
bool m_debug;
9090

contrib/libosmium/include/osmium/area/detail/vector.hpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111
@@ -73,37 +73,37 @@ namespace osmium {
7373
}; // struct vec
7474

7575
// addition
76-
constexpr inline vec operator+(const vec& lhs, const vec& rhs) noexcept {
76+
constexpr vec operator+(const vec& lhs, const vec& rhs) noexcept {
7777
return vec{lhs.x + rhs.x, lhs.y + rhs.y};
7878
}
7979

8080
// subtraction
81-
constexpr inline vec operator-(const vec& lhs, const vec& rhs) noexcept {
81+
constexpr vec operator-(const vec& lhs, const vec& rhs) noexcept {
8282
return vec{lhs.x - rhs.x, lhs.y - rhs.y};
8383
}
8484

8585
// cross product
86-
constexpr inline int64_t operator*(const vec& lhs, const vec& rhs) noexcept {
87-
return lhs.x * rhs.y - lhs.y * rhs.x;
86+
constexpr int64_t operator*(const vec& lhs, const vec& rhs) noexcept {
87+
return (lhs.x * rhs.y) - (lhs.y * rhs.x);
8888
}
8989

9090
// scale vector
91-
constexpr inline vec operator*(double s, const vec& v) noexcept {
91+
constexpr vec operator*(double s, const vec& v) noexcept {
9292
return vec{static_cast<int64_t>(s * static_cast<double>(v.x)), static_cast<int64_t>(s * static_cast<double>(v.y))};
9393
}
9494

9595
// scale vector
96-
constexpr inline vec operator*(const vec& v, double s) noexcept {
96+
constexpr vec operator*(const vec& v, double s) noexcept {
9797
return vec{static_cast<int64_t>(s * static_cast<double>(v.x)), static_cast<int64_t>(s * static_cast<double>(v.y))};
9898
}
9999

100100
// equality
101-
constexpr inline bool operator==(const vec& lhs, const vec& rhs) noexcept {
101+
constexpr bool operator==(const vec& lhs, const vec& rhs) noexcept {
102102
return lhs.x == rhs.x && lhs.y == rhs.y;
103103
}
104104

105105
// inequality
106-
constexpr inline bool operator!=(const vec& lhs, const vec& rhs) noexcept {
106+
constexpr bool operator!=(const vec& lhs, const vec& rhs) noexcept {
107107
return !(lhs == rhs);
108108
}
109109

contrib/libosmium/include/osmium/area/geom_assembler.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

contrib/libosmium/include/osmium/area/multipolygon_collector.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111
@@ -79,7 +79,7 @@ namespace osmium {
7979
using collector_type = osmium::relations::Collector<MultipolygonCollector<TAssembler>, false, true, false>;
8080

8181
using assembler_config_type = typename TAssembler::config_type;
82-
const assembler_config_type m_assembler_config;
82+
assembler_config_type m_assembler_config;
8383

8484
osmium::memory::Buffer m_output_buffer;
8585

contrib/libosmium/include/osmium/area/multipolygon_manager.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111
@@ -76,7 +76,7 @@ namespace osmium {
7676
class MultipolygonManager : public osmium::relations::RelationsManager<MultipolygonManager<TAssembler>, false, true, false> {
7777

7878
using assembler_config_type = typename TAssembler::config_type;
79-
const assembler_config_type m_assembler_config;
79+
assembler_config_type m_assembler_config;
8080

8181
area_stats m_stats;
8282

contrib/libosmium/include/osmium/area/multipolygon_manager_legacy.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111
@@ -78,7 +78,7 @@ namespace osmium {
7878
class MultipolygonManagerLegacy : public osmium::relations::RelationsManager<MultipolygonManagerLegacy<TAssembler>, false, true, false> {
7979

8080
using assembler_config_type = typename TAssembler::config_type;
81-
const assembler_config_type m_assembler_config;
81+
assembler_config_type m_assembler_config;
8282

8383
area_stats m_stats;
8484

contrib/libosmium/include/osmium/area/problem_reporter.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

contrib/libosmium/include/osmium/area/problem_reporter_exception.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

contrib/libosmium/include/osmium/area/problem_reporter_ogr.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111
@@ -89,7 +89,7 @@ namespace osmium {
8989
}
9090

9191
void write_line(const char* problem_type, osmium::object_id_type id1, osmium::object_id_type id2, osmium::Location loc1, osmium::Location loc2) {
92-
auto ogr_linestring = std::unique_ptr<OGRLineString>{new OGRLineString{}};
92+
auto ogr_linestring = std::make_unique<OGRLineString>();
9393
ogr_linestring->addPoint(loc1.lon(), loc1.lat());
9494
ogr_linestring->addPoint(loc2.lon(), loc2.lat());
9595

contrib/libosmium/include/osmium/area/problem_reporter_stream.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

contrib/libosmium/include/osmium/area/stats.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file is part of Osmium (https://osmcode.org/libosmium).
77
8-
Copyright 2013-2023 Jochen Topf <[email protected]> and others (see README).
8+
Copyright 2013-2025 Jochen Topf <[email protected]> and others (see README).
99
1010
Boost Software License - Version 1.0 - August 17th, 2003
1111

0 commit comments

Comments
 (0)