diff --git a/contrib/libosmium/README.contrib b/contrib/libosmium/README.contrib index 9f7e2eff7..997cc5923 100644 --- a/contrib/libosmium/README.contrib +++ b/contrib/libosmium/README.contrib @@ -1,2 +1,2 @@ Source: https://github.com/osmcode/libosmium -Revision: v2.20.0 +Revision: v2.21.0 diff --git a/contrib/libosmium/include/osmium/area/assembler.hpp b/contrib/libosmium/include/osmium/area/assembler.hpp index 9ed2d5ff1..3116f47b0 100644 --- a/contrib/libosmium/include/osmium/area/assembler.hpp +++ b/contrib/libosmium/include/osmium/area/assembler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/assembler_config.hpp b/contrib/libosmium/include/osmium/area/assembler_config.hpp index 5fa11d2ca..e81afcfa3 100644 --- a/contrib/libosmium/include/osmium/area/assembler_config.hpp +++ b/contrib/libosmium/include/osmium/area/assembler_config.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/assembler_legacy.hpp b/contrib/libosmium/include/osmium/area/assembler_legacy.hpp index 23bfa2bca..f30ab329d 100644 --- a/contrib/libosmium/include/osmium/area/assembler_legacy.hpp +++ b/contrib/libosmium/include/osmium/area/assembler_legacy.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/detail/basic_assembler.hpp b/contrib/libosmium/include/osmium/area/detail/basic_assembler.hpp index 842136249..5a378d076 100644 --- a/contrib/libosmium/include/osmium/area/detail/basic_assembler.hpp +++ b/contrib/libosmium/include/osmium/area/detail/basic_assembler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -70,7 +70,7 @@ namespace osmium { struct location_to_ring_map { osmium::Location location; - open_ring_its_type::iterator ring_it{}; + open_ring_its_type::iterator ring_it; bool start{false}; location_to_ring_map(osmium::Location l, open_ring_its_type::iterator r, const bool s) noexcept : @@ -217,7 +217,7 @@ namespace osmium { } } - for (const osmium::Way* way : ways_in_multiple_rings) { + for (const osmium::Way* way : ways_in_multiple_rings) { // NOLINT(bugprone-nondeterministic-pointer-iteration-order) ++m_stats.ways_in_multiple_rings; if (debug()) { std::cerr << " Way " << way->id() << " is in multiple rings\n"; @@ -326,7 +326,7 @@ namespace osmium { const int64_t ay = a.y(); const int64_t by = b.y(); const int64_t ly = end_location.y(); - const auto z = (bx - ax) * (ly - ay) - (by - ay) * (lx - ax); + const auto z = ((bx - ax) * (ly - ay)) - ((by - ay) * (lx - ax)); if (debug()) { std::cerr << " Segment z=" << z << '\n'; } @@ -353,7 +353,7 @@ namespace osmium { const int64_t ay = a.y(); const int64_t by = b.y(); const int64_t ly = location.y(); - const auto z = (bx - ax) * (ly - ay) - (by - ay) * (lx - ax); + const auto z = ((bx - ax) * (ly - ay)) - ((by - ay) * (lx - ax)); if (z >= 0) { nesting += segment->is_reverse() ? -1 : 1; @@ -362,7 +362,7 @@ namespace osmium { } if (segment->ring()->is_outer()) { const double y = static_cast(ay) + - static_cast((by - ay) * (lx - ax)) / static_cast(bx - ax); + (static_cast((by - ay) * (lx - ax)) / static_cast(bx - ax)); if (debug()) { std::cerr << " Segment belongs to outer ring (y=" << y << " ring=" << *segment->ring() << ")\n"; } @@ -703,7 +703,7 @@ namespace osmium { struct candidate { int64_t sum; - std::vector> rings{}; + std::vector> rings; osmium::Location start_location; osmium::Location stop_location; diff --git a/contrib/libosmium/include/osmium/area/detail/basic_assembler_with_tags.hpp b/contrib/libosmium/include/osmium/area/detail/basic_assembler_with_tags.hpp index b5a173b44..9e4a4072e 100644 --- a/contrib/libosmium/include/osmium/area/detail/basic_assembler_with_tags.hpp +++ b/contrib/libosmium/include/osmium/area/detail/basic_assembler_with_tags.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/detail/node_ref_segment.hpp b/contrib/libosmium/include/osmium/area/detail/node_ref_segment.hpp index 8da4f8ccf..5ecaf02a4 100644 --- a/contrib/libosmium/include/osmium/area/detail/node_ref_segment.hpp +++ b/contrib/libosmium/include/osmium/area/detail/node_ref_segment.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -75,10 +75,10 @@ namespace osmium { class NodeRefSegment { // First node in order described above. - osmium::NodeRef m_first{}; + osmium::NodeRef m_first; // Second node in order described above. - osmium::NodeRef m_second{}; + osmium::NodeRef m_second; // Way this segment was from. const osmium::Way* m_way = nullptr; @@ -319,11 +319,11 @@ namespace osmium { // intersection in a point - const int64_t na = (q1.x - q0.x) * (p0.y - q0.y) - - (q1.y - q0.y) * (p0.x - q0.x); + const int64_t na = ((q1.x - q0.x) * (p0.y - q0.y)) - + ((q1.y - q0.y) * (p0.x - q0.x)); - const int64_t nb = (p1.x - p0.x) * (p0.y - q0.y) - - (p1.y - p0.y) * (p0.x - q0.x); + const int64_t nb = ((p1.x - p0.x) * (p0.y - q0.y)) - + ((p1.y - p0.y) * (p0.x - q0.x)); if ((d > 0 && na >= 0 && na <= d && nb >= 0 && nb <= d) || (d < 0 && na <= 0 && na >= d && nb <= 0 && nb >= d)) { diff --git a/contrib/libosmium/include/osmium/area/detail/proto_ring.hpp b/contrib/libosmium/include/osmium/area/detail/proto_ring.hpp index 9b773a0a9..ec62dca59 100644 --- a/contrib/libosmium/include/osmium/area/detail/proto_ring.hpp +++ b/contrib/libosmium/include/osmium/area/detail/proto_ring.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -64,11 +64,11 @@ namespace osmium { private: // Segments in this ring. - segments_type m_segments{}; + segments_type m_segments; // If this is an outer ring, these point to it's inner rings // (if any). - std::vector m_inner{}; + std::vector m_inner; // The smallest segment. Will be kept current whenever a new // segment is added to the ring. diff --git a/contrib/libosmium/include/osmium/area/detail/segment_list.hpp b/contrib/libosmium/include/osmium/area/detail/segment_list.hpp index 53f203215..9f0e4c4f8 100644 --- a/contrib/libosmium/include/osmium/area/detail/segment_list.hpp +++ b/contrib/libosmium/include/osmium/area/detail/segment_list.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -84,7 +84,7 @@ namespace osmium { using slist_type = std::vector; - slist_type m_segments{}; + slist_type m_segments; bool m_debug; diff --git a/contrib/libosmium/include/osmium/area/detail/vector.hpp b/contrib/libosmium/include/osmium/area/detail/vector.hpp index e52a65cc5..3c1ba31b0 100644 --- a/contrib/libosmium/include/osmium/area/detail/vector.hpp +++ b/contrib/libosmium/include/osmium/area/detail/vector.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -73,37 +73,37 @@ namespace osmium { }; // struct vec // addition - constexpr inline vec operator+(const vec& lhs, const vec& rhs) noexcept { + constexpr vec operator+(const vec& lhs, const vec& rhs) noexcept { return vec{lhs.x + rhs.x, lhs.y + rhs.y}; } // subtraction - constexpr inline vec operator-(const vec& lhs, const vec& rhs) noexcept { + constexpr vec operator-(const vec& lhs, const vec& rhs) noexcept { return vec{lhs.x - rhs.x, lhs.y - rhs.y}; } // cross product - constexpr inline int64_t operator*(const vec& lhs, const vec& rhs) noexcept { - return lhs.x * rhs.y - lhs.y * rhs.x; + constexpr int64_t operator*(const vec& lhs, const vec& rhs) noexcept { + return (lhs.x * rhs.y) - (lhs.y * rhs.x); } // scale vector - constexpr inline vec operator*(double s, const vec& v) noexcept { + constexpr vec operator*(double s, const vec& v) noexcept { return vec{static_cast(s * static_cast(v.x)), static_cast(s * static_cast(v.y))}; } // scale vector - constexpr inline vec operator*(const vec& v, double s) noexcept { + constexpr vec operator*(const vec& v, double s) noexcept { return vec{static_cast(s * static_cast(v.x)), static_cast(s * static_cast(v.y))}; } // equality - constexpr inline bool operator==(const vec& lhs, const vec& rhs) noexcept { + constexpr bool operator==(const vec& lhs, const vec& rhs) noexcept { return lhs.x == rhs.x && lhs.y == rhs.y; } // inequality - constexpr inline bool operator!=(const vec& lhs, const vec& rhs) noexcept { + constexpr bool operator!=(const vec& lhs, const vec& rhs) noexcept { return !(lhs == rhs); } diff --git a/contrib/libosmium/include/osmium/area/geom_assembler.hpp b/contrib/libosmium/include/osmium/area/geom_assembler.hpp index 6a665b4a9..8ce75a7a6 100644 --- a/contrib/libosmium/include/osmium/area/geom_assembler.hpp +++ b/contrib/libosmium/include/osmium/area/geom_assembler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/multipolygon_collector.hpp b/contrib/libosmium/include/osmium/area/multipolygon_collector.hpp index a2a70b69f..c983ae18a 100644 --- a/contrib/libosmium/include/osmium/area/multipolygon_collector.hpp +++ b/contrib/libosmium/include/osmium/area/multipolygon_collector.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -79,7 +79,7 @@ namespace osmium { using collector_type = osmium::relations::Collector, false, true, false>; using assembler_config_type = typename TAssembler::config_type; - const assembler_config_type m_assembler_config; + assembler_config_type m_assembler_config; osmium::memory::Buffer m_output_buffer; diff --git a/contrib/libosmium/include/osmium/area/multipolygon_manager.hpp b/contrib/libosmium/include/osmium/area/multipolygon_manager.hpp index c478aa158..26b4c06ec 100644 --- a/contrib/libosmium/include/osmium/area/multipolygon_manager.hpp +++ b/contrib/libosmium/include/osmium/area/multipolygon_manager.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -76,7 +76,7 @@ namespace osmium { class MultipolygonManager : public osmium::relations::RelationsManager, false, true, false> { using assembler_config_type = typename TAssembler::config_type; - const assembler_config_type m_assembler_config; + assembler_config_type m_assembler_config; area_stats m_stats; diff --git a/contrib/libosmium/include/osmium/area/multipolygon_manager_legacy.hpp b/contrib/libosmium/include/osmium/area/multipolygon_manager_legacy.hpp index feea9a04b..adf9eda0c 100644 --- a/contrib/libosmium/include/osmium/area/multipolygon_manager_legacy.hpp +++ b/contrib/libosmium/include/osmium/area/multipolygon_manager_legacy.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -78,7 +78,7 @@ namespace osmium { class MultipolygonManagerLegacy : public osmium::relations::RelationsManager, false, true, false> { using assembler_config_type = typename TAssembler::config_type; - const assembler_config_type m_assembler_config; + assembler_config_type m_assembler_config; area_stats m_stats; diff --git a/contrib/libosmium/include/osmium/area/problem_reporter.hpp b/contrib/libosmium/include/osmium/area/problem_reporter.hpp index 4c32ed970..95e4e8206 100644 --- a/contrib/libosmium/include/osmium/area/problem_reporter.hpp +++ b/contrib/libosmium/include/osmium/area/problem_reporter.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/problem_reporter_exception.hpp b/contrib/libosmium/include/osmium/area/problem_reporter_exception.hpp index 4527a9984..216b4b0c4 100644 --- a/contrib/libosmium/include/osmium/area/problem_reporter_exception.hpp +++ b/contrib/libosmium/include/osmium/area/problem_reporter_exception.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/problem_reporter_ogr.hpp b/contrib/libosmium/include/osmium/area/problem_reporter_ogr.hpp index bad49f89c..a99e2f1f3 100644 --- a/contrib/libosmium/include/osmium/area/problem_reporter_ogr.hpp +++ b/contrib/libosmium/include/osmium/area/problem_reporter_ogr.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -89,7 +89,7 @@ namespace osmium { } void write_line(const char* problem_type, osmium::object_id_type id1, osmium::object_id_type id2, osmium::Location loc1, osmium::Location loc2) { - auto ogr_linestring = std::unique_ptr{new OGRLineString{}}; + auto ogr_linestring = std::make_unique(); ogr_linestring->addPoint(loc1.lon(), loc1.lat()); ogr_linestring->addPoint(loc2.lon(), loc2.lat()); diff --git a/contrib/libosmium/include/osmium/area/problem_reporter_stream.hpp b/contrib/libosmium/include/osmium/area/problem_reporter_stream.hpp index 9fa2ccdb7..d2307a6a3 100644 --- a/contrib/libosmium/include/osmium/area/problem_reporter_stream.hpp +++ b/contrib/libosmium/include/osmium/area/problem_reporter_stream.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/area/stats.hpp b/contrib/libosmium/include/osmium/area/stats.hpp index d081e6110..2699d7445 100644 --- a/contrib/libosmium/include/osmium/area/stats.hpp +++ b/contrib/libosmium/include/osmium/area/stats.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/builder/attr.hpp b/contrib/libosmium/include/osmium/builder/attr.hpp index b11272659..fdc54bb34 100644 --- a/contrib/libosmium/include/osmium/builder/attr.hpp +++ b/contrib/libosmium/include/osmium/builder/attr.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -182,7 +182,7 @@ namespace osmium { #define OSMIUM_ATTRIBUTE_WITH_CONSTRUCTOR(_handler, _name, _type) \ OSMIUM_ATTRIBUTE(_handler, _name, _type) \ - constexpr explicit _name(std::add_const<_type>::type& value) : \ + constexpr explicit _name(std::add_const_t<_type>& value) : \ type_wrapper(value) {} \ } @@ -381,7 +381,7 @@ namespace osmium { }; template - inline constexpr detail::tags_from_iterator_pair _tags(TTagIterator first, TTagIterator last) { + constexpr detail::tags_from_iterator_pair _tags(TTagIterator first, TTagIterator last) { return {first, last}; } @@ -409,7 +409,7 @@ namespace osmium { }; template - inline constexpr detail::nodes_from_iterator_pair _nodes(TIdIterator first, TIdIterator last) { + constexpr detail::nodes_from_iterator_pair _nodes(TIdIterator first, TIdIterator last) { return {first, last}; } @@ -449,7 +449,7 @@ namespace osmium { }; template - inline constexpr detail::members_from_iterator_pair _members(TMemberIterator first, TMemberIterator last) { + constexpr detail::members_from_iterator_pair _members(TMemberIterator first, TMemberIterator last) { return {first, last}; } @@ -481,7 +481,7 @@ namespace osmium { }; template - inline constexpr detail::comments_from_iterator_pair _comments(TCommentIterator first, TCommentIterator last) { + constexpr detail::comments_from_iterator_pair _comments(TCommentIterator first, TCommentIterator last) { return {first, last}; } @@ -501,7 +501,7 @@ namespace osmium { template - inline constexpr detail::outer_ring_from_iterator_pair _outer_ring(TIdIterator first, TIdIterator last) { + constexpr detail::outer_ring_from_iterator_pair _outer_ring(TIdIterator first, TIdIterator last) { return {first, last}; } @@ -527,7 +527,7 @@ namespace osmium { } template - inline constexpr detail::inner_ring_from_iterator_pair _inner_ring(TIdIterator first, TIdIterator last) { + constexpr detail::inner_ring_from_iterator_pair _inner_ring(TIdIterator first, TIdIterator last) { return {first, last}; } @@ -649,16 +649,16 @@ namespace osmium { // ============================================================== template - inline constexpr const char* get_user(const attr::_user& user, const TArgs&... /*args*/) noexcept { + constexpr const char* get_user(const attr::_user& user, const TArgs&... /*args*/) noexcept { return user.value; } - inline constexpr const char* get_user() noexcept { + constexpr const char* get_user() noexcept { return ""; } template - inline constexpr typename std::enable_if::value, const char*>::type + constexpr std::enable_if_t::value, const char*> get_user(const TFirst& /*first*/, const TRest&... args) noexcept { return get_user(args...); } @@ -802,12 +802,12 @@ namespace osmium { // ============================================================== template - inline typename std::enable_if::value>::type + inline std::enable_if_t::value> add_list(osmium::builder::Builder& /*parent*/, const TArgs&... /*args*/) noexcept { } template - inline typename std::enable_if::value>::type + inline std::enable_if_t::value> add_list(osmium::builder::Builder& parent, const TArgs&... args) { TBuilder builder{parent.buffer(), &parent}; (void)std::initializer_list{ diff --git a/contrib/libosmium/include/osmium/builder/builder.hpp b/contrib/libosmium/include/osmium/builder/builder.hpp index feda7c36e..2206bcd50 100644 --- a/contrib/libosmium/include/osmium/builder/builder.hpp +++ b/contrib/libosmium/include/osmium/builder/builder.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/builder/osm_object_builder.hpp b/contrib/libosmium/include/osmium/builder/osm_object_builder.hpp index c3228ca7d..7e49535d9 100644 --- a/contrib/libosmium/include/osmium/builder/osm_object_builder.hpp +++ b/contrib/libosmium/include/osmium/builder/osm_object_builder.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/diff_handler.hpp b/contrib/libosmium/include/osmium/diff_handler.hpp index 1f88f768d..935d6a1a1 100644 --- a/contrib/libosmium/include/osmium/diff_handler.hpp +++ b/contrib/libosmium/include/osmium/diff_handler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/diff_iterator.hpp b/contrib/libosmium/include/osmium/diff_iterator.hpp index 08b8ea09b..c6c725168 100644 --- a/contrib/libosmium/include/osmium/diff_iterator.hpp +++ b/contrib/libosmium/include/osmium/diff_iterator.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -62,7 +62,7 @@ namespace osmium { TBasicIterator m_curr; TBasicIterator m_next; - const TBasicIterator m_end; + TBasicIterator m_end; mutable osmium::DiffObject m_diff; diff --git a/contrib/libosmium/include/osmium/diff_visitor.hpp b/contrib/libosmium/include/osmium/diff_visitor.hpp index 976c63313..32f0ff328 100644 --- a/contrib/libosmium/include/osmium/diff_visitor.hpp +++ b/contrib/libosmium/include/osmium/diff_visitor.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/dynamic_handler.hpp b/contrib/libosmium/include/osmium/dynamic_handler.hpp index 73f2ac54a..3917309dd 100644 --- a/contrib/libosmium/include/osmium/dynamic_handler.hpp +++ b/contrib/libosmium/include/osmium/dynamic_handler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/experimental/flex_reader.hpp b/contrib/libosmium/include/osmium/experimental/flex_reader.hpp index dc8289624..ad4525f1f 100644 --- a/contrib/libosmium/include/osmium/experimental/flex_reader.hpp +++ b/contrib/libosmium/include/osmium/experimental/flex_reader.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -84,11 +84,11 @@ namespace osmium { } explicit FlexReader(const std::string& filename, TLocationHandler& location_handler, osmium::osm_entity_bits::type entities = osmium::osm_entity_bits::nwr) : - FlexReader(osmium::io::File(filename), location_handler, entities) { + FlexReader(osmium::io::File{filename}, location_handler, entities) { } explicit FlexReader(const char* filename, TLocationHandler& location_handler, osmium::osm_entity_bits::type entities = osmium::osm_entity_bits::nwr) : - FlexReader(osmium::io::File(filename), location_handler, entities) { + FlexReader(osmium::io::File{filename}, location_handler, entities) { } osmium::memory::Buffer read() { @@ -117,7 +117,7 @@ namespace osmium { } void close() { - return m_reader.close(); + m_reader.close(); } bool eof() const { diff --git a/contrib/libosmium/include/osmium/fwd.hpp b/contrib/libosmium/include/osmium/fwd.hpp index f556d3fc3..b80c5d742 100644 --- a/contrib/libosmium/include/osmium/fwd.hpp +++ b/contrib/libosmium/include/osmium/fwd.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/coordinates.hpp b/contrib/libosmium/include/osmium/geom/coordinates.hpp index 161c0021e..c734d0dd7 100644 --- a/contrib/libosmium/include/osmium/geom/coordinates.hpp +++ b/contrib/libosmium/include/osmium/geom/coordinates.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/factory.hpp b/contrib/libosmium/include/osmium/geom/factory.hpp index 07c7f2e67..148a3e2e3 100644 --- a/contrib/libosmium/include/osmium/geom/factory.hpp +++ b/contrib/libosmium/include/osmium/geom/factory.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/geojson.hpp b/contrib/libosmium/include/osmium/geom/geojson.hpp index 193c8cd22..41650501b 100644 --- a/contrib/libosmium/include/osmium/geom/geojson.hpp +++ b/contrib/libosmium/include/osmium/geom/geojson.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/geos.hpp b/contrib/libosmium/include/osmium/geom/geos.hpp index 73538f9b5..d859e6be3 100644 --- a/contrib/libosmium/include/osmium/geom/geos.hpp +++ b/contrib/libosmium/include/osmium/geom/geos.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/haversine.hpp b/contrib/libosmium/include/osmium/geom/haversine.hpp index 3da00d588..a57170f82 100644 --- a/contrib/libosmium/include/osmium/geom/haversine.hpp +++ b/contrib/libosmium/include/osmium/geom/haversine.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -69,7 +69,7 @@ namespace osmium { double lath = std::sin(deg_to_rad(c1.y - c2.y) * 0.5); lath *= lath; const double tmp = std::cos(deg_to_rad(c1.y)) * std::cos(deg_to_rad(c2.y)); - return 2.0 * EARTH_RADIUS_IN_METERS * std::asin(std::sqrt(lath + tmp * lonh)); + return 2.0 * EARTH_RADIUS_IN_METERS * std::asin(std::sqrt(lath + (tmp * lonh))); } /** diff --git a/contrib/libosmium/include/osmium/geom/mercator_projection.hpp b/contrib/libosmium/include/osmium/geom/mercator_projection.hpp index acb4d27f1..514152e1c 100644 --- a/contrib/libosmium/include/osmium/geom/mercator_projection.hpp +++ b/contrib/libosmium/include/osmium/geom/mercator_projection.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -49,12 +49,12 @@ namespace osmium { constexpr double earth_radius_for_epsg3857 = 6378137.0; constexpr double max_coordinate_epsg3857 = 20037508.34; - constexpr inline double lon_to_x(double lon) noexcept { + constexpr double lon_to_x(double lon) noexcept { return earth_radius_for_epsg3857 * deg_to_rad(lon); } inline double lat_to_y_with_tan(double lat) { // not constexpr because math functions aren't - return earth_radius_for_epsg3857 * std::log(std::tan(osmium::geom::PI / 4 + deg_to_rad(lat) / 2)); + return earth_radius_for_epsg3857 * std::log(std::tan((osmium::geom::PI / 4) + (deg_to_rad(lat) / 2))); } #ifdef OSMIUM_USE_SLOW_MERCATOR_PROJECTION @@ -96,12 +96,12 @@ namespace osmium { } #endif - constexpr inline double x_to_lon(double x) { + constexpr double x_to_lon(double x) { return rad_to_deg(x) / earth_radius_for_epsg3857; } inline double y_to_lat(double y) { // not constexpr because math functions aren't - return rad_to_deg(2 * std::atan(std::exp(y / earth_radius_for_epsg3857)) - osmium::geom::PI / 2); + return rad_to_deg((2 * std::atan(std::exp(y / earth_radius_for_epsg3857))) - (osmium::geom::PI / 2)); } } // namespace detail diff --git a/contrib/libosmium/include/osmium/geom/ogr.hpp b/contrib/libosmium/include/osmium/geom/ogr.hpp index 226684b28..603a104cf 100644 --- a/contrib/libosmium/include/osmium/geom/ogr.hpp +++ b/contrib/libosmium/include/osmium/geom/ogr.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -83,13 +83,13 @@ namespace osmium { /* Point */ static point_type make_point(const osmium::geom::Coordinates& xy) { - return point_type{new OGRPoint{xy.x, xy.y}}; + return std::make_unique(xy.x, xy.y); } /* LineString */ void linestring_start() { - m_linestring.reset(new OGRLineString{}); + m_linestring = std::make_unique(); } void linestring_add_location(const osmium::geom::Coordinates& xy) { @@ -105,7 +105,7 @@ namespace osmium { /* Polygon */ void polygon_start() { - m_ring.reset(new OGRLinearRing{}); + m_ring = std::make_unique(); } void polygon_add_location(const osmium::geom::Coordinates& xy) { @@ -114,7 +114,7 @@ namespace osmium { } polygon_type polygon_finish(size_t /* num_points */) { - auto polygon = std::unique_ptr{new OGRPolygon{}}; + auto polygon = std::make_unique(); polygon->addRingDirectly(m_ring.release()); return polygon; } @@ -122,11 +122,11 @@ namespace osmium { /* MultiPolygon */ void multipolygon_start() { - m_multipolygon.reset(new OGRMultiPolygon{}); + m_multipolygon = std::make_unique(); } void multipolygon_polygon_start() { - m_polygon.reset(new OGRPolygon{}); + m_polygon = std::make_unique(); } void multipolygon_polygon_finish() { @@ -136,7 +136,7 @@ namespace osmium { } void multipolygon_outer_ring_start() { - m_ring.reset(new OGRLinearRing{}); + m_ring = std::make_unique(); } void multipolygon_outer_ring_finish() { @@ -146,7 +146,7 @@ namespace osmium { } void multipolygon_inner_ring_start() { - m_ring.reset(new OGRLinearRing{}); + m_ring = std::make_unique(); } void multipolygon_inner_ring_finish() { diff --git a/contrib/libosmium/include/osmium/geom/projection.hpp b/contrib/libosmium/include/osmium/geom/projection.hpp deleted file mode 100644 index b96980f86..000000000 --- a/contrib/libosmium/include/osmium/geom/projection.hpp +++ /dev/null @@ -1,213 +0,0 @@ -#ifndef OSMIUM_GEOM_PROJECTION_HPP -#define OSMIUM_GEOM_PROJECTION_HPP - -/* - -This file is part of Osmium (https://osmcode.org/libosmium). - -Copyright 2013-2023 Jochen Topf and others (see README). - -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -*/ - -/** - * @file - * - * This file contains code for projecting OSM locations to arbitrary - * coordinate reference systems. It is based on the Proj.4 library. - * - * @attention If you include this file, you'll need to link with `libproj`. - */ - -#include -#include -#include -#include -#include - -#ifdef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H -# include -#else -# define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H -# include -# undef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H -#endif - -#include -#include - -namespace osmium { - - namespace geom { - - /** - * C++ wrapper for a Coordinate Reference System of the proj library. - * - * @deprecated Only supports the old PROJ API. - */ - class OSMIUM_DEPRECATED CRS { - - struct ProjCRSDeleter { - void operator()(void* crs) { - pj_free(crs); - } - }; // struct ProjCRSDeleter - - std::unique_ptr m_crs; - - public: - - explicit CRS(const char* crs) : - m_crs(pj_init_plus(crs), ProjCRSDeleter()) { - if (!m_crs) { - throw osmium::projection_error{std::string{"creation of CRS failed: "} + pj_strerrno(*pj_get_errno_ref())}; - } - } - - explicit CRS(const std::string& crs) : - CRS(crs.c_str()) { - } - - explicit CRS(int epsg) : - CRS(std::string{"+init=epsg:"} + std::to_string(epsg)) { - } - - /** - * Get underlying projPJ handle from proj library. - */ - projPJ get() const noexcept { - return m_crs.get(); - } - - bool is_latlong() const noexcept { - return pj_is_latlong(m_crs.get()) != 0; - } - - bool is_geocent() const noexcept { - return pj_is_geocent(m_crs.get()) != 0; - } - - }; // class CRS - - /** - * Transform coordinates from one CRS into another. Wraps the same - * function of the proj library. - * - * Coordinates have to be in radians and are produced in radians. - * - * @throws osmium::projection_error if the projection fails - * - * @deprecated Only supports the old PROJ API. - */ - inline OSMIUM_DEPRECATED Coordinates transform(const CRS& src, const CRS& dest, Coordinates c) { - const int result = pj_transform(src.get(), dest.get(), 1, 1, &c.x, &c.y, nullptr); - if (result != 0) { - throw osmium::projection_error{std::string{"projection failed: "} + pj_strerrno(result)}; - } - return c; - } - - /** - * Functor that does projection from WGS84 (EPSG:4326) to the given - * CRS. - * - * If this Projection is initialized with the constructor taking - * an integer with the epsg code 4326, no projection is done. If it - * is initialized with epsg code 3857 the Osmium-internal - * implementation of the Mercator projection is used, otherwise this - * falls back to using the proj.4 library. Note that this "magic" does - * not work if you use any of the constructors taking a string. - * - * @deprecated Only supports the old PROJ API. - */ - class OSMIUM_DEPRECATED Projection { - - int m_epsg; - std::string m_proj_string; - CRS m_crs_wgs84{4326}; - CRS m_crs_user; - - public: - - explicit Projection(std::string proj_string) : - m_epsg(-1), - m_proj_string(std::move(proj_string)), - m_crs_user(proj_string) { - } - - explicit Projection(const char* proj_string) : - m_epsg(-1), - m_proj_string(proj_string), - m_crs_user(proj_string) { - } - - explicit Projection(int epsg) : - m_epsg(epsg), - m_proj_string(std::string{"+init=epsg:"} + std::to_string(epsg)), - m_crs_user(epsg) { - } - - /** - * Do coordinate transformation. - * - * @pre Location must be in valid range (depends on projection - * used). - */ - Coordinates operator()(osmium::Location location) const { - if (m_epsg == 4326) { - return Coordinates{location.lon(), location.lat()}; - } - - if (m_epsg == 3857) { - return Coordinates{detail::lon_to_x(location.lon()), - detail::lat_to_y(location.lat())}; - } - - Coordinates c{transform(m_crs_wgs84, m_crs_user, Coordinates{deg_to_rad(location.lon()), - deg_to_rad(location.lat())})}; - if (m_crs_user.is_latlong()) { - c.x = rad_to_deg(c.x); - c.y = rad_to_deg(c.y); - } - - return c; - } - - int epsg() const noexcept { - return m_epsg; - } - - std::string proj_string() const { - return m_proj_string; - } - - }; // class Projection - - } // namespace geom - -} // namespace osmium - -#endif // OSMIUM_GEOM_PROJECTION_HPP diff --git a/contrib/libosmium/include/osmium/geom/rapid_geojson.hpp b/contrib/libosmium/include/osmium/geom/rapid_geojson.hpp index 94f172609..5e415f5b4 100644 --- a/contrib/libosmium/include/osmium/geom/rapid_geojson.hpp +++ b/contrib/libosmium/include/osmium/geom/rapid_geojson.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/relations.hpp b/contrib/libosmium/include/osmium/geom/relations.hpp index 6c4352d3e..4a33574ce 100644 --- a/contrib/libosmium/include/osmium/geom/relations.hpp +++ b/contrib/libosmium/include/osmium/geom/relations.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/tile.hpp b/contrib/libosmium/include/osmium/geom/tile.hpp index d03504bc9..242fd5c27 100644 --- a/contrib/libosmium/include/osmium/geom/tile.hpp +++ b/contrib/libosmium/include/osmium/geom/tile.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -46,9 +46,11 @@ namespace osmium { namespace detail { - template - inline constexpr const T& clamp(const T& value, const T& min, const T& max) { - return value < min ? min : (max < value ? max : value); + constexpr int32_t clamp(int32_t value, int32_t min, int32_t max) { + if (value < min) { + return min; + } + return max < value ? max : value; } } // namespace detail @@ -57,7 +59,7 @@ namespace osmium { * Returns the number of tiles (in each direction) for the given zoom * level. */ - inline constexpr uint32_t num_tiles_in_zoom(uint32_t zoom) noexcept { + constexpr uint32_t num_tiles_in_zoom(uint32_t zoom) noexcept { return 1U << zoom; } @@ -65,7 +67,7 @@ namespace osmium { * Returns the width or height of a tile in web mercator coordinates for * the given zoom level. */ - inline constexpr double tile_extent_in_zoom(uint32_t zoom) noexcept { + constexpr double tile_extent_in_zoom(uint32_t zoom) noexcept { return detail::max_coordinate_epsg3857 * 2 / num_tiles_in_zoom(zoom); } @@ -74,10 +76,11 @@ namespace osmium { * projection in the given zoom level. Tiles are numbered from left * to right. */ - inline constexpr uint32_t mercx_to_tilex(uint32_t zoom, double x) noexcept { - return static_cast(detail::clamp( + constexpr uint32_t mercx_to_tilex(uint32_t zoom, double x) noexcept { + return static_cast(detail::clamp( static_cast((x + detail::max_coordinate_epsg3857) / tile_extent_in_zoom(zoom)), - 0, num_tiles_in_zoom(zoom) - 1)); + 0, + static_cast(num_tiles_in_zoom(zoom) - 1))); } /** @@ -85,10 +88,11 @@ namespace osmium { * projection in the given zoom level. Tiles are numbered from top * to bottom. */ - inline constexpr uint32_t mercy_to_tiley(uint32_t zoom, double y) noexcept { - return static_cast(detail::clamp( + constexpr uint32_t mercy_to_tiley(uint32_t zoom, double y) noexcept { + return static_cast(detail::clamp( static_cast((detail::max_coordinate_epsg3857 - y) / tile_extent_in_zoom(zoom)), - 0, num_tiles_in_zoom(zoom) - 1)); + 0, + static_cast(num_tiles_in_zoom(zoom) - 1))); } /** diff --git a/contrib/libosmium/include/osmium/geom/util.hpp b/contrib/libosmium/include/osmium/geom/util.hpp index 2e8ee858c..2341b38d7 100644 --- a/contrib/libosmium/include/osmium/geom/util.hpp +++ b/contrib/libosmium/include/osmium/geom/util.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -61,12 +61,12 @@ namespace osmium { constexpr double PI = 3.14159265358979323846; /// Convert angle from degrees to radians. - inline constexpr double deg_to_rad(double degree) noexcept { + constexpr double deg_to_rad(double degree) noexcept { return degree * (PI / 180.0); } /// Convert angle from radians to degrees. - inline constexpr double rad_to_deg(double radians) noexcept { + constexpr double rad_to_deg(double radians) noexcept { return radians * (180.0 / PI); } diff --git a/contrib/libosmium/include/osmium/geom/wkb.hpp b/contrib/libosmium/include/osmium/geom/wkb.hpp index 15a7d44ec..30f0b5428 100644 --- a/contrib/libosmium/include/osmium/geom/wkb.hpp +++ b/contrib/libosmium/include/osmium/geom/wkb.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/geom/wkt.hpp b/contrib/libosmium/include/osmium/geom/wkt.hpp index 216873dfe..5be2507cc 100644 --- a/contrib/libosmium/include/osmium/geom/wkt.hpp +++ b/contrib/libosmium/include/osmium/geom/wkt.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/handler.hpp b/contrib/libosmium/include/osmium/handler.hpp index 58bc427cd..cd510c30a 100644 --- a/contrib/libosmium/include/osmium/handler.hpp +++ b/contrib/libosmium/include/osmium/handler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/handler/chain.hpp b/contrib/libosmium/include/osmium/handler/chain.hpp index 70ad76b3c..869076809 100644 --- a/contrib/libosmium/include/osmium/handler/chain.hpp +++ b/contrib/libosmium/include/osmium/handler/chain.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/handler/check_order.hpp b/contrib/libosmium/include/osmium/handler/check_order.hpp index 1daedda31..643034226 100644 --- a/contrib/libosmium/include/osmium/handler/check_order.hpp +++ b/contrib/libosmium/include/osmium/handler/check_order.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/handler/disk_store.hpp b/contrib/libosmium/include/osmium/handler/disk_store.hpp index e5bd36c51..2d5ec190e 100644 --- a/contrib/libosmium/include/osmium/handler/disk_store.hpp +++ b/contrib/libosmium/include/osmium/handler/disk_store.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/handler/dump.hpp b/contrib/libosmium/include/osmium/handler/dump.hpp index 86398c9cd..c08d79752 100644 --- a/contrib/libosmium/include/osmium/handler/dump.hpp +++ b/contrib/libosmium/include/osmium/handler/dump.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/handler/node_locations_for_ways.hpp b/contrib/libosmium/include/osmium/handler/node_locations_for_ways.hpp index 8e66f3837..05b36e814 100644 --- a/contrib/libosmium/include/osmium/handler/node_locations_for_ways.hpp +++ b/contrib/libosmium/include/osmium/handler/node_locations_for_ways.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/handler/object_relations.hpp b/contrib/libosmium/include/osmium/handler/object_relations.hpp index a50b61c65..0dee79edf 100644 --- a/contrib/libosmium/include/osmium/handler/object_relations.hpp +++ b/contrib/libosmium/include/osmium/handler/object_relations.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/detail/create_map_with_fd.hpp b/contrib/libosmium/include/osmium/index/detail/create_map_with_fd.hpp index c67329f9a..8870f09b2 100644 --- a/contrib/libosmium/include/osmium/index/detail/create_map_with_fd.hpp +++ b/contrib/libosmium/include/osmium/index/detail/create_map_with_fd.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/detail/mmap_vector_anon.hpp b/contrib/libosmium/include/osmium/index/detail/mmap_vector_anon.hpp index 075d187e8..1b36522c7 100644 --- a/contrib/libosmium/include/osmium/index/detail/mmap_vector_anon.hpp +++ b/contrib/libosmium/include/osmium/index/detail/mmap_vector_anon.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/detail/mmap_vector_base.hpp b/contrib/libosmium/include/osmium/index/detail/mmap_vector_base.hpp index 3da81ca4b..a81cde7fb 100644 --- a/contrib/libosmium/include/osmium/index/detail/mmap_vector_base.hpp +++ b/contrib/libosmium/include/osmium/index/detail/mmap_vector_base.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/detail/mmap_vector_file.hpp b/contrib/libosmium/include/osmium/index/detail/mmap_vector_file.hpp index 5f048e072..f7e18e59c 100644 --- a/contrib/libosmium/include/osmium/index/detail/mmap_vector_file.hpp +++ b/contrib/libosmium/include/osmium/index/detail/mmap_vector_file.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/detail/tmpfile.hpp b/contrib/libosmium/include/osmium/index/detail/tmpfile.hpp index 38746d3f1..88db24d7d 100644 --- a/contrib/libosmium/include/osmium/index/detail/tmpfile.hpp +++ b/contrib/libosmium/include/osmium/index/detail/tmpfile.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -33,6 +33,8 @@ DEALINGS IN THE SOFTWARE. */ +#include + #include #include #include @@ -43,16 +45,19 @@ namespace osmium { /** * Create and open a temporary file. It is removed after opening. + * After use close the file by calling close(). * * @returns File descriptor of temporary file. * @throws std::system_error if something went wrong. */ inline int create_tmp_file() { - FILE* file = ::tmpfile(); + FILE* file = std::tmpfile(); if (!file) { throw std::system_error{errno, std::system_category(), "tempfile failed"}; } - return fileno(file); + const int fd = osmium::io::detail::reliable_dup(fileno(file)); + std::fclose(file); + return fd; } } // namespace detail diff --git a/contrib/libosmium/include/osmium/index/detail/vector_map.hpp b/contrib/libosmium/include/osmium/index/detail/vector_map.hpp index d9ee56db4..550694b98 100644 --- a/contrib/libosmium/include/osmium/index/detail/vector_map.hpp +++ b/contrib/libosmium/include/osmium/index/detail/vector_map.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/detail/vector_multimap.hpp b/contrib/libosmium/include/osmium/index/detail/vector_multimap.hpp index ab272618e..a1a5a7320 100644 --- a/contrib/libosmium/include/osmium/index/detail/vector_multimap.hpp +++ b/contrib/libosmium/include/osmium/index/detail/vector_multimap.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/id_set.hpp b/contrib/libosmium/include/osmium/index/id_set.hpp index c2f44c59e..c5732ea3a 100644 --- a/contrib/libosmium/include/osmium/index/id_set.hpp +++ b/contrib/libosmium/include/osmium/index/id_set.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/index.hpp b/contrib/libosmium/include/osmium/index/index.hpp index 6e780a34d..9ebb4cce6 100644 --- a/contrib/libosmium/include/osmium/index/index.hpp +++ b/contrib/libosmium/include/osmium/index/index.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -76,7 +76,7 @@ namespace osmium { * object, but it can be specialized. */ template - inline constexpr T empty_value() { + constexpr T empty_value() { return T{}; } @@ -86,7 +86,7 @@ namespace osmium { * the full range, so the max value is a good "empty" value. */ template <> - inline constexpr size_t empty_value() { + constexpr size_t empty_value() { return std::numeric_limits::max(); } diff --git a/contrib/libosmium/include/osmium/index/map.hpp b/contrib/libosmium/include/osmium/index/map.hpp index c2ffe9112..ff2a54d56 100644 --- a/contrib/libosmium/include/osmium/index/map.hpp +++ b/contrib/libosmium/include/osmium/index/map.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/all.hpp b/contrib/libosmium/include/osmium/index/map/all.hpp index 4bcb0cc95..9f001c30c 100644 --- a/contrib/libosmium/include/osmium/index/map/all.hpp +++ b/contrib/libosmium/include/osmium/index/map/all.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/dense_file_array.hpp b/contrib/libosmium/include/osmium/index/map/dense_file_array.hpp index 8f00c8c1b..674464589 100644 --- a/contrib/libosmium/include/osmium/index/map/dense_file_array.hpp +++ b/contrib/libosmium/include/osmium/index/map/dense_file_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/dense_mem_array.hpp b/contrib/libosmium/include/osmium/index/map/dense_mem_array.hpp index 68b4b64e5..0a90488a3 100644 --- a/contrib/libosmium/include/osmium/index/map/dense_mem_array.hpp +++ b/contrib/libosmium/include/osmium/index/map/dense_mem_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/dense_mmap_array.hpp b/contrib/libosmium/include/osmium/index/map/dense_mmap_array.hpp index d59457d1f..0ee920491 100644 --- a/contrib/libosmium/include/osmium/index/map/dense_mmap_array.hpp +++ b/contrib/libosmium/include/osmium/index/map/dense_mmap_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/dummy.hpp b/contrib/libosmium/include/osmium/index/map/dummy.hpp index e5f24a607..e29322371 100644 --- a/contrib/libosmium/include/osmium/index/map/dummy.hpp +++ b/contrib/libosmium/include/osmium/index/map/dummy.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/flex_mem.hpp b/contrib/libosmium/include/osmium/index/map/flex_mem.hpp index 74b0e390c..b282217b2 100644 --- a/contrib/libosmium/include/osmium/index/map/flex_mem.hpp +++ b/contrib/libosmium/include/osmium/index/map/flex_mem.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -192,8 +192,8 @@ namespace osmium { std::size_t used_memory() const noexcept final { return sizeof(FlexMem) + - m_sparse_entries.size() * sizeof(entry) + - m_dense_blocks.size() * (block_size * sizeof(TValue) + sizeof(std::vector)); + (m_sparse_entries.size() * sizeof(entry)) + + (m_dense_blocks.size() * (block_size * sizeof(TValue) + sizeof(std::vector))); } void set(const TId id, const TValue value) final { diff --git a/contrib/libosmium/include/osmium/index/map/sparse_file_array.hpp b/contrib/libosmium/include/osmium/index/map/sparse_file_array.hpp index b0e25021f..8832682f1 100644 --- a/contrib/libosmium/include/osmium/index/map/sparse_file_array.hpp +++ b/contrib/libosmium/include/osmium/index/map/sparse_file_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/sparse_mem_array.hpp b/contrib/libosmium/include/osmium/index/map/sparse_mem_array.hpp index 004a5abf3..ce0ef9cb7 100644 --- a/contrib/libosmium/include/osmium/index/map/sparse_mem_array.hpp +++ b/contrib/libosmium/include/osmium/index/map/sparse_mem_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/map/sparse_mem_map.hpp b/contrib/libosmium/include/osmium/index/map/sparse_mem_map.hpp index 68869c083..b7b798abb 100644 --- a/contrib/libosmium/include/osmium/index/map/sparse_mem_map.hpp +++ b/contrib/libosmium/include/osmium/index/map/sparse_mem_map.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -63,7 +63,7 @@ namespace osmium { // and parent plus some overhead for color of red-black-tree // or similar). enum { - element_size = sizeof(TId) + sizeof(TValue) + sizeof(void*) * 4U + element_size = sizeof(TId) + sizeof(TValue) + (sizeof(void*) * 4U) }; std::map m_elements; diff --git a/contrib/libosmium/include/osmium/index/map/sparse_mmap_array.hpp b/contrib/libosmium/include/osmium/index/map/sparse_mmap_array.hpp index 0f8f4295f..b616f1921 100644 --- a/contrib/libosmium/include/osmium/index/map/sparse_mmap_array.hpp +++ b/contrib/libosmium/include/osmium/index/map/sparse_mmap_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/multimap.hpp b/contrib/libosmium/include/osmium/index/multimap.hpp index 97cf9f513..6c72fdcc5 100644 --- a/contrib/libosmium/include/osmium/index/multimap.hpp +++ b/contrib/libosmium/include/osmium/index/multimap.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/multimap/all.hpp b/contrib/libosmium/include/osmium/index/multimap/all.hpp index 1f4ffd007..439762a74 100644 --- a/contrib/libosmium/include/osmium/index/multimap/all.hpp +++ b/contrib/libosmium/include/osmium/index/multimap/all.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/multimap/hybrid.hpp b/contrib/libosmium/include/osmium/index/multimap/hybrid.hpp index 2ebdb3a50..45e38d954 100644 --- a/contrib/libosmium/include/osmium/index/multimap/hybrid.hpp +++ b/contrib/libosmium/include/osmium/index/multimap/hybrid.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/multimap/sparse_file_array.hpp b/contrib/libosmium/include/osmium/index/multimap/sparse_file_array.hpp index 68b618d47..38cf5e4cb 100644 --- a/contrib/libosmium/include/osmium/index/multimap/sparse_file_array.hpp +++ b/contrib/libosmium/include/osmium/index/multimap/sparse_file_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/multimap/sparse_mem_array.hpp b/contrib/libosmium/include/osmium/index/multimap/sparse_mem_array.hpp index caff6eade..c9a24eb79 100644 --- a/contrib/libosmium/include/osmium/index/multimap/sparse_mem_array.hpp +++ b/contrib/libosmium/include/osmium/index/multimap/sparse_mem_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/multimap/sparse_mem_multimap.hpp b/contrib/libosmium/include/osmium/index/multimap/sparse_mem_multimap.hpp index bb4e7798e..5899d647a 100644 --- a/contrib/libosmium/include/osmium/index/multimap/sparse_mem_multimap.hpp +++ b/contrib/libosmium/include/osmium/index/multimap/sparse_mem_multimap.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -60,7 +60,7 @@ namespace osmium { // and parent plus some overhead for color of red-black-tree // or similar). enum { - element_size = sizeof(TId) + sizeof(TValue) + sizeof(void*) * 4U + element_size = sizeof(TId) + sizeof(TValue) + (sizeof(void*) * 4U) }; public: diff --git a/contrib/libosmium/include/osmium/index/multimap/sparse_mmap_array.hpp b/contrib/libosmium/include/osmium/index/multimap/sparse_mmap_array.hpp index 44db98a1d..7d82c3eac 100644 --- a/contrib/libosmium/include/osmium/index/multimap/sparse_mmap_array.hpp +++ b/contrib/libosmium/include/osmium/index/multimap/sparse_mmap_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/node_locations_map.hpp b/contrib/libosmium/include/osmium/index/node_locations_map.hpp index f1263e413..3a1035c49 100644 --- a/contrib/libosmium/include/osmium/index/node_locations_map.hpp +++ b/contrib/libosmium/include/osmium/index/node_locations_map.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/nwr_array.hpp b/contrib/libosmium/include/osmium/index/nwr_array.hpp index 3abf95aa1..001851a11 100644 --- a/contrib/libosmium/include/osmium/index/nwr_array.hpp +++ b/contrib/libosmium/include/osmium/index/nwr_array.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/index/relations_map.hpp b/contrib/libosmium/include/osmium/index/relations_map.hpp index 39bc13fdf..2cfcfc93b 100644 --- a/contrib/libosmium/include/osmium/index/relations_map.hpp +++ b/contrib/libosmium/include/osmium/index/relations_map.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -95,7 +95,7 @@ namespace osmium { m_map.emplace_back(key, value); } - typename std::enable_if::value>::type flip_in_place() { + std::enable_if_t::value> flip_in_place() { for (auto& p : m_map) { using std::swap; swap(p.key, p.value); @@ -260,8 +260,8 @@ namespace osmium { // defined outside the class on purpose // see https://akrzemi1.wordpress.com/2015/09/11/declaring-the-move-constructor/ - inline RelationsMapIndex::RelationsMapIndex(RelationsMapIndex&&) noexcept(std::is_nothrow_move_constructible::value) = default; - inline RelationsMapIndex& RelationsMapIndex::operator=(RelationsMapIndex&&) noexcept(std::is_nothrow_move_assignable::value) = default; + inline RelationsMapIndex::RelationsMapIndex(RelationsMapIndex&&) noexcept(std::is_nothrow_move_constructible::value) = default; // NOLINT(readability-redundant-inline-specifier) + inline RelationsMapIndex& RelationsMapIndex::operator=(RelationsMapIndex&&) noexcept(std::is_nothrow_move_assignable::value) = default; // NOLINT(readability-redundant-inline-specifier) class RelationsMapIndexes { @@ -442,8 +442,8 @@ namespace osmium { // defined outside the class on purpose // see https://akrzemi1.wordpress.com/2015/09/11/declaring-the-move-constructor/ - inline RelationsMapStash::RelationsMapStash(RelationsMapStash&&) noexcept(std::is_nothrow_move_constructible::value) = default; - inline RelationsMapStash& RelationsMapStash::operator=(RelationsMapStash&&) noexcept(std::is_nothrow_move_assignable::value) = default; + inline RelationsMapStash::RelationsMapStash(RelationsMapStash&&) noexcept(std::is_nothrow_move_constructible::value) = default; // NOLINT(readability-redundant-inline-specifier) + inline RelationsMapStash& RelationsMapStash::operator=(RelationsMapStash&&) noexcept(std::is_nothrow_move_assignable::value) = default; // NOLINT(readability-redundant-inline-specifier) } // namespace index diff --git a/contrib/libosmium/include/osmium/io/any_compression.hpp b/contrib/libosmium/include/osmium/io/any_compression.hpp index 507a04cc3..ebdb0f87c 100644 --- a/contrib/libosmium/include/osmium/io/any_compression.hpp +++ b/contrib/libosmium/include/osmium/io/any_compression.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/any_input.hpp b/contrib/libosmium/include/osmium/io/any_input.hpp index 58336cc3b..bb625ed8c 100644 --- a/contrib/libosmium/include/osmium/io/any_input.hpp +++ b/contrib/libosmium/include/osmium/io/any_input.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/any_output.hpp b/contrib/libosmium/include/osmium/io/any_output.hpp index 87c1de9be..a78fff652 100644 --- a/contrib/libosmium/include/osmium/io/any_output.hpp +++ b/contrib/libosmium/include/osmium/io/any_output.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/bzip2_compression.hpp b/contrib/libosmium/include/osmium/io/bzip2_compression.hpp index 7641572fa..99c50cc2a 100644 --- a/contrib/libosmium/include/osmium/io/bzip2_compression.hpp +++ b/contrib/libosmium/include/osmium/io/bzip2_compression.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -195,7 +195,7 @@ namespace osmium { ~Bzip2Compressor() noexcept override { try { close(); - } catch (...) { + } catch (...) { // NOLINT(bugprone-empty-catch) // Ignore any exceptions because destructor must not throw. } } @@ -269,7 +269,7 @@ namespace osmium { ~Bzip2Decompressor() noexcept override { try { close(); - } catch (...) { + } catch (...) { // NOLINT(bugprone-empty-catch) // Ignore any exceptions because destructor must not throw. } } @@ -294,22 +294,26 @@ namespace osmium { detail::throw_bzip2_error(m_bzfile, "read failed", bzerror); } if (bzerror == BZ_STREAM_END) { - void* unused = nullptr; - int nunused = 0; if (!feof(m_file.file())) { - ::BZ2_bzReadGetUnused(&bzerror, m_bzfile, &unused, &nunused); + void* unused = nullptr; + int num_unused = 0; + ::BZ2_bzReadGetUnused(&bzerror, m_bzfile, &unused, &num_unused); if (bzerror != BZ_OK) { detail::throw_bzip2_error(m_bzfile, "get unused failed", bzerror); } - std::string unused_data{static_cast(unused), static_cast(nunused)}; - ::BZ2_bzReadClose(&bzerror, m_bzfile); - if (bzerror != BZ_OK) { - throw bzip2_error{"bzip2 error: read close failed", bzerror}; - } - assert(unused_data.size() < std::numeric_limits::max()); - m_bzfile = ::BZ2_bzReadOpen(&bzerror, m_file.file(), 0, 0, &*unused_data.begin(), static_cast(unused_data.size())); - if (!m_bzfile) { - throw bzip2_error{"bzip2 error: read open failed", bzerror}; + if (num_unused != 0) { + std::string unused_data{static_cast(unused), static_cast(num_unused)}; + ::BZ2_bzReadClose(&bzerror, m_bzfile); + if (bzerror != BZ_OK) { + throw bzip2_error{"bzip2 error: read close failed", bzerror}; + } + assert(unused_data.size() < std::numeric_limits::max()); + m_bzfile = ::BZ2_bzReadOpen(&bzerror, m_file.file(), 0, 0, &*unused_data.begin(), static_cast(unused_data.size())); + if (!m_bzfile) { + throw bzip2_error{"bzip2 error: read open failed", bzerror}; + } + } else { + m_stream_end = true; } } else { m_stream_end = true; @@ -373,7 +377,7 @@ namespace osmium { ~Bzip2BufferDecompressor() noexcept override { try { close(); - } catch (...) { + } catch (...) { // NOLINT(bugprone-empty-catch) // Ignore any exceptions because destructor must not throw. } } diff --git a/contrib/libosmium/include/osmium/io/compression.hpp b/contrib/libosmium/include/osmium/io/compression.hpp index cd45791fd..f21905d34 100644 --- a/contrib/libosmium/include/osmium/io/compression.hpp +++ b/contrib/libosmium/include/osmium/io/compression.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -246,7 +246,7 @@ namespace osmium { ~NoCompressor() noexcept override { try { close(); - } catch (...) { + } catch (...) { // NOLINT(bugprone-empty-catch) // Ignore any exceptions because destructor must not throw. } } @@ -337,7 +337,7 @@ namespace osmium { ~NoDecompressor() noexcept override { try { close(); - } catch (...) { + } catch (...) { // NOLINT(bugprone-empty-catch) // Ignore any exceptions because destructor must not throw. } } diff --git a/contrib/libosmium/include/osmium/io/debug_output.hpp b/contrib/libosmium/include/osmium/io/debug_output.hpp index 9d7051a3a..87bf29d32 100644 --- a/contrib/libosmium/include/osmium/io/debug_output.hpp +++ b/contrib/libosmium/include/osmium/io/debug_output.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/debug_output_format.hpp b/contrib/libosmium/include/osmium/io/detail/debug_output_format.hpp index d2a09598f..9767690e9 100644 --- a/contrib/libosmium/include/osmium/io/detail/debug_output_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/debug_output_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/ids_output_format.hpp b/contrib/libosmium/include/osmium/io/detail/ids_output_format.hpp index d6c3c9f52..87448280b 100644 --- a/contrib/libosmium/include/osmium/io/detail/ids_output_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/ids_output_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/input_format.hpp b/contrib/libosmium/include/osmium/io/detail/input_format.hpp index 7e3ee521f..f16a1b77e 100644 --- a/contrib/libosmium/include/osmium/io/detail/input_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/input_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/lz4.hpp b/contrib/libosmium/include/osmium/io/detail/lz4.hpp index 1527f4476..601ffc5af 100644 --- a/contrib/libosmium/include/osmium/io/detail/lz4.hpp +++ b/contrib/libosmium/include/osmium/io/detail/lz4.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -58,7 +58,7 @@ namespace osmium { namespace detail { - constexpr inline int lz4_default_compression_level() noexcept { + constexpr int lz4_default_compression_level() noexcept { return 1; // LZ4_ACCELERATION_DEFAULT } diff --git a/contrib/libosmium/include/osmium/io/detail/o5m_input_format.hpp b/contrib/libosmium/include/osmium/io/detail/o5m_input_format.hpp index 8deec41ea..2f6995186 100644 --- a/contrib/libosmium/include/osmium/io/detail/o5m_input_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/o5m_input_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -153,9 +153,9 @@ namespace osmium { class O5mParser final : public ParserWithBuffer { - osmium::io::Header m_header{}; + osmium::io::Header m_header; - std::string m_input{}; + std::string m_input; const char* m_data; const char* m_end; diff --git a/contrib/libosmium/include/osmium/io/detail/opl_input_format.hpp b/contrib/libosmium/include/osmium/io/detail/opl_input_format.hpp index f76e14ffe..568110af2 100644 --- a/contrib/libosmium/include/osmium/io/detail/opl_input_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/opl_input_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/opl_output_format.hpp b/contrib/libosmium/include/osmium/io/detail/opl_output_format.hpp index cfb2c5f33..ab5a847b1 100644 --- a/contrib/libosmium/include/osmium/io/detail/opl_output_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/opl_output_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/opl_parser_functions.hpp b/contrib/libosmium/include/osmium/io/detail/opl_parser_functions.hpp index 3ce11b44c..8fb5c3966 100644 --- a/contrib/libosmium/include/osmium/io/detail/opl_parser_functions.hpp +++ b/contrib/libosmium/include/osmium/io/detail/opl_parser_functions.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/output_format.hpp b/contrib/libosmium/include/osmium/io/detail/output_format.hpp index c7ba6fa79..3a86d497c 100644 --- a/contrib/libosmium/include/osmium/io/detail/output_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/output_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/pbf.hpp b/contrib/libosmium/include/osmium/io/detail/pbf.hpp index 21cccfa1a..0dd5e7550 100644 --- a/contrib/libosmium/include/osmium/io/detail/pbf.hpp +++ b/contrib/libosmium/include/osmium/io/detail/pbf.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/pbf_decoder.hpp b/contrib/libosmium/include/osmium/io/detail/pbf_decoder.hpp index 804dd5831..6f77dda6b 100644 --- a/contrib/libosmium/include/osmium/io/detail/pbf_decoder.hpp +++ b/contrib/libosmium/include/osmium/io/detail/pbf_decoder.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/pbf_input_format.hpp b/contrib/libosmium/include/osmium/io/detail/pbf_input_format.hpp index 0f1060083..fc4b70d18 100644 --- a/contrib/libosmium/include/osmium/io/detail/pbf_input_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/pbf_input_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -65,7 +65,7 @@ namespace osmium { class PBFParser final : public Parser { - std::string m_input_buffer{}; + std::string m_input_buffer; std::atomic* m_offset_ptr; int m_fd; bool m_want_buffered_pages_removed; @@ -114,29 +114,6 @@ namespace osmium { return size; } - /** - * Read exactly size bytes from fd into buffer. - * - * @pre Value in size parameter must fit in unsigned int - * @returns true if size bytes could be read - * false if EOF was encountered - */ - bool read_exactly(char* buffer, std::size_t size) { - std::size_t to_read = size; - - while (to_read > 0) { - auto const read_size = osmium::io::detail::reliable_read(m_fd, buffer + (size - to_read), static_cast(to_read)); - if (read_size == 0) { // EOF - return false; - } - to_read -= read_size; - } - - *m_offset_ptr += size; - - return true; - } - /** * Read 4 bytes in network byte order from file. They contain * the length of the following BlobHeader. @@ -144,7 +121,7 @@ namespace osmium { uint32_t read_blob_header_size_from_file() { if (m_fd != -1) { std::array buffer{}; - if (!read_exactly(buffer.data(), buffer.size())) { + if (!osmium::io::detail::read_exactly(m_fd, buffer.data(), static_cast(buffer.size()))) { return 0; // EOF } return check_size(get_size_in_network_byte_order(buffer.data())); @@ -230,7 +207,7 @@ namespace osmium { if (m_fd != -1) { buffer.resize(size); - if (!read_exactly(&*buffer.begin(), size)) { + if (!osmium::io::detail::read_exactly(m_fd, &*buffer.begin(), static_cast(size))) { throw osmium::pbf_error{"unexpected EOF"}; } } else { diff --git a/contrib/libosmium/include/osmium/io/detail/pbf_output_format.hpp b/contrib/libosmium/include/osmium/io/detail/pbf_output_format.hpp index f6e0f6dcc..4834475c0 100644 --- a/contrib/libosmium/include/osmium/io/detail/pbf_output_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/pbf_output_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -275,7 +275,7 @@ namespace osmium { protozero::pbf_builder m_pbf_primitive_group; StringTable m_stringtable; pbf_output_options m_options; - std::unique_ptr m_dense_nodes{}; + std::unique_ptr m_dense_nodes; OSMFormat::PrimitiveGroup m_type; int m_count = 0; @@ -312,7 +312,7 @@ namespace osmium { void add_dense_node(const osmium::Node& node) { if (!m_dense_nodes) { - m_dense_nodes.reset(new DenseNodes{&m_stringtable, &m_options}); + m_dense_nodes = std::make_unique(&m_stringtable, &m_options); } m_dense_nodes->add_node(node); ++m_count; @@ -366,7 +366,7 @@ namespace osmium { class SerializeBlob { - std::shared_ptr m_block{}; + std::shared_ptr m_block; std::string m_msg; @@ -482,7 +482,7 @@ namespace osmium { pbf_output_options m_options; - std::shared_ptr m_primitive_block{}; + std::shared_ptr m_primitive_block; std::size_t m_bucket_count = StringTable::min_bucket_count; @@ -553,7 +553,7 @@ namespace osmium { void switch_primitive_block_type(OSMFormat::PrimitiveGroup type) { if (!m_primitive_block || !m_primitive_block->can_add(type)) { store_primitive_block(); - m_primitive_block.reset(new PrimitiveBlock{m_options, type, m_bucket_count}); + m_primitive_block = std::make_shared(m_options, type, m_bucket_count); } } diff --git a/contrib/libosmium/include/osmium/io/detail/protobuf_tags.hpp b/contrib/libosmium/include/osmium/io/detail/protobuf_tags.hpp index 6bd67b504..50e09fc18 100644 --- a/contrib/libosmium/include/osmium/io/detail/protobuf_tags.hpp +++ b/contrib/libosmium/include/osmium/io/detail/protobuf_tags.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/queue_util.hpp b/contrib/libosmium/include/osmium/io/detail/queue_util.hpp index 16edcf1e2..5bffb1e00 100644 --- a/contrib/libosmium/include/osmium/io/detail/queue_util.hpp +++ b/contrib/libosmium/include/osmium/io/detail/queue_util.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -117,7 +117,8 @@ namespace osmium { ~queue_wrapper() noexcept { try { shutdown(); - } catch (...) { + } catch (...) { // NOLINT(bugprone-empty-catch) + // Ignore any exceptions because destructor must not throw. } } diff --git a/contrib/libosmium/include/osmium/io/detail/read_thread.hpp b/contrib/libosmium/include/osmium/io/detail/read_thread.hpp index 607ecae9a..e0077585b 100644 --- a/contrib/libosmium/include/osmium/io/detail/read_thread.hpp +++ b/contrib/libosmium/include/osmium/io/detail/read_thread.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/read_write.hpp b/contrib/libosmium/include/osmium/io/detail/read_write.hpp index bde056b6d..dffc6e7ec 100644 --- a/contrib/libosmium/include/osmium/io/detail/read_write.hpp +++ b/contrib/libosmium/include/osmium/io/detail/read_write.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -36,6 +36,7 @@ DEALINGS IN THE SOFTWARE. #include #include +#include #include #include #include @@ -201,6 +202,29 @@ namespace osmium { return nread; } + /** + * Read exactly size bytes from fd into buffer. In contrast to reliable_read, + * this function will continue reading until either EOF or an error is encountered. + * + * @pre buffer Buffer for data to be read. Must be at least size bytes long. + * @returns true if size bytes could be read + * false if EOF was encountered + */ + inline bool read_exactly(int fd, char* buffer, unsigned int size) { + unsigned int to_read = size; + + while (to_read > 0) { + auto const read_size = reliable_read(fd, buffer + (size - to_read), to_read); + if (read_size == 0) { // EOF + return false; + } + assert(read_size <= to_read); + to_read -= static_cast(read_size); + } + + return true; + } + inline void reliable_fsync(const int fd) { #ifdef _MSC_VER osmium::detail::disable_invalid_parameter_handler diph; diff --git a/contrib/libosmium/include/osmium/io/detail/string_table.hpp b/contrib/libosmium/include/osmium/io/detail/string_table.hpp index f378dbb73..5045c8d6c 100644 --- a/contrib/libosmium/include/osmium/io/detail/string_table.hpp +++ b/contrib/libosmium/include/osmium/io/detail/string_table.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -115,7 +115,7 @@ namespace osmium { using it_type = std::list::const_iterator; it_type m_it; - const it_type m_last; + it_type m_last; const char* m_pos; public: diff --git a/contrib/libosmium/include/osmium/io/detail/string_util.hpp b/contrib/libosmium/include/osmium/io/detail/string_util.hpp index ea5855613..381e84aed 100644 --- a/contrib/libosmium/include/osmium/io/detail/string_util.hpp +++ b/contrib/libosmium/include/osmium/io/detail/string_util.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/write_thread.hpp b/contrib/libosmium/include/osmium/io/detail/write_thread.hpp index e4d9e9efe..8f00896d8 100644 --- a/contrib/libosmium/include/osmium/io/detail/write_thread.hpp +++ b/contrib/libosmium/include/osmium/io/detail/write_thread.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/xml_input_format.hpp b/contrib/libosmium/include/osmium/io/detail/xml_input_format.hpp index 1b0fd8b37..9ee85dee5 100644 --- a/contrib/libosmium/include/osmium/io/detail/xml_input_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/xml_input_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -150,17 +150,17 @@ namespace osmium { std::vector m_context_stack; - osmium::io::Header m_header{}; + osmium::io::Header m_header; - std::unique_ptr m_node_builder{}; - std::unique_ptr m_way_builder{}; - std::unique_ptr m_relation_builder{}; - std::unique_ptr m_changeset_builder{}; - std::unique_ptr m_changeset_discussion_builder{}; + std::unique_ptr m_node_builder; + std::unique_ptr m_way_builder; + std::unique_ptr m_relation_builder; + std::unique_ptr m_changeset_builder; + std::unique_ptr m_changeset_discussion_builder; - std::unique_ptr m_tl_builder{}; - std::unique_ptr m_wnl_builder{}; - std::unique_ptr m_rml_builder{}; + std::unique_ptr m_tl_builder; + std::unique_ptr m_wnl_builder; + std::unique_ptr m_rml_builder; std::string m_comment_text; @@ -338,7 +338,7 @@ namespace osmium { }); if (!m_tl_builder) { - m_tl_builder.reset(new osmium::builder::TagListBuilder{builder}); + m_tl_builder = std::make_unique(builder); } m_tl_builder->add_tag(k, v); } @@ -391,7 +391,7 @@ namespace osmium { mark_header_as_done(); if (read_types() & osmium::osm_entity_bits::node) { maybe_new_buffer(osmium::item_type::node); - m_node_builder.reset(new osmium::builder::NodeBuilder{buffer()}); + m_node_builder = std::make_unique(buffer()); m_node_builder->set_user(init_object(m_node_builder->object(), attrs)); } return; @@ -402,7 +402,7 @@ namespace osmium { mark_header_as_done(); if (read_types() & osmium::osm_entity_bits::way) { maybe_new_buffer(osmium::item_type::way); - m_way_builder.reset(new osmium::builder::WayBuilder{buffer()}); + m_way_builder = std::make_unique(buffer()); m_way_builder->set_user(init_object(m_way_builder->object(), attrs)); } return; @@ -413,7 +413,7 @@ namespace osmium { mark_header_as_done(); if (read_types() & osmium::osm_entity_bits::relation) { maybe_new_buffer(osmium::item_type::relation); - m_relation_builder.reset(new osmium::builder::RelationBuilder{buffer()}); + m_relation_builder = std::make_unique(buffer()); m_relation_builder->set_user(init_object(m_relation_builder->object(), attrs)); } return; @@ -428,7 +428,7 @@ namespace osmium { mark_header_as_done(); if (read_types() & osmium::osm_entity_bits::changeset) { maybe_new_buffer(osmium::item_type::changeset); - m_changeset_builder.reset(new osmium::builder::ChangesetBuilder{buffer()}); + m_changeset_builder = std::make_unique(buffer()); init_changeset(*m_changeset_builder, attrs); } } else if (!std::strcmp(element, "create")) { @@ -508,7 +508,7 @@ namespace osmium { m_tl_builder.reset(); if (!m_wnl_builder) { - m_wnl_builder.reset(new osmium::builder::WayNodeListBuilder{*m_way_builder}); + m_wnl_builder = std::make_unique(*m_way_builder); } NodeRef nr; @@ -542,7 +542,7 @@ namespace osmium { m_tl_builder.reset(); if (!m_rml_builder) { - m_rml_builder.reset(new osmium::builder::RelationMemberListBuilder{*m_relation_builder}); + m_rml_builder = std::make_unique(*m_relation_builder); } item_type type = item_type::undefined; @@ -591,7 +591,7 @@ namespace osmium { if (read_types() & osmium::osm_entity_bits::changeset) { m_tl_builder.reset(); if (!m_changeset_discussion_builder) { - m_changeset_discussion_builder.reset(new osmium::builder::ChangesetDiscussionBuilder{*m_changeset_builder}); + m_changeset_discussion_builder = std::make_unique(*m_changeset_builder); } } } else if (!std::strcmp(element, "tag")) { @@ -776,6 +776,9 @@ namespace osmium { mark_header_as_done(); flush_final_buffer(); + + // so we don't have a dangling link to local parser variable + m_expat_xml_parser = nullptr; } }; // class XMLParser diff --git a/contrib/libosmium/include/osmium/io/detail/xml_output_format.hpp b/contrib/libosmium/include/osmium/io/detail/xml_output_format.hpp index b02f27fec..88a4a0b29 100644 --- a/contrib/libosmium/include/osmium/io/detail/xml_output_format.hpp +++ b/contrib/libosmium/include/osmium/io/detail/xml_output_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/detail/zlib.hpp b/contrib/libosmium/include/osmium/io/detail/zlib.hpp index bf70a8322..502fe9d35 100644 --- a/contrib/libosmium/include/osmium/io/detail/zlib.hpp +++ b/contrib/libosmium/include/osmium/io/detail/zlib.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -55,7 +55,7 @@ namespace osmium { namespace detail { - constexpr inline int zlib_default_compression_level() noexcept { + constexpr int zlib_default_compression_level() noexcept { return Z_DEFAULT_COMPRESSION; } diff --git a/contrib/libosmium/include/osmium/io/error.hpp b/contrib/libosmium/include/osmium/io/error.hpp index 3064373be..eabdcde39 100644 --- a/contrib/libosmium/include/osmium/io/error.hpp +++ b/contrib/libosmium/include/osmium/io/error.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/file.hpp b/contrib/libosmium/include/osmium/io/file.hpp index c1f8eade6..7c8e6345a 100644 --- a/contrib/libosmium/include/osmium/io/file.hpp +++ b/contrib/libosmium/include/osmium/io/file.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -73,7 +73,7 @@ namespace osmium { private: - std::string m_filename{}; + std::string m_filename; const char* m_buffer = nullptr; size_t m_buffer_size = 0; diff --git a/contrib/libosmium/include/osmium/io/file_compression.hpp b/contrib/libosmium/include/osmium/io/file_compression.hpp index 86ba32574..79f20e34d 100644 --- a/contrib/libosmium/include/osmium/io/file_compression.hpp +++ b/contrib/libosmium/include/osmium/io/file_compression.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/file_format.hpp b/contrib/libosmium/include/osmium/io/file_format.hpp index d90ded854..35fbb46a9 100644 --- a/contrib/libosmium/include/osmium/io/file_format.hpp +++ b/contrib/libosmium/include/osmium/io/file_format.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/gzip_compression.hpp b/contrib/libosmium/include/osmium/io/gzip_compression.hpp index 1331b98ab..ed7fa2b6e 100644 --- a/contrib/libosmium/include/osmium/io/gzip_compression.hpp +++ b/contrib/libosmium/include/osmium/io/gzip_compression.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -131,7 +131,7 @@ namespace osmium { ~GzipCompressor() noexcept override { try { close(); - } catch (...) { + } catch (...) { // NOLINT(bugprone-empty-catch) // Ignore any exceptions because destructor must not throw. } } @@ -196,7 +196,7 @@ namespace osmium { if (!m_gzfile) { try { osmium::io::detail::reliable_close(fd); - } catch (...) { + } catch (...) { // NOLINT(bugprone-empty-catch) } throw gzip_error{"gzip error: read initialization failed"}; } @@ -211,7 +211,7 @@ namespace osmium { ~GzipDecompressor() noexcept override { try { close(); - } catch (...) { + } catch (...) { // NOLINT(bugprone-empty-catch) // Ignore any exceptions because destructor must not throw. } } @@ -293,7 +293,7 @@ namespace osmium { ~GzipBufferDecompressor() noexcept override { try { close(); - } catch (...) { + } catch (...) { // NOLINT(bugprone-empty-catch) // Ignore any exceptions because destructor must not throw. } } diff --git a/contrib/libosmium/include/osmium/io/header.hpp b/contrib/libosmium/include/osmium/io/header.hpp index 2a652f70e..9c2903111 100644 --- a/contrib/libosmium/include/osmium/io/header.hpp +++ b/contrib/libosmium/include/osmium/io/header.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -68,7 +68,7 @@ namespace osmium { class Header : public osmium::Options { /// Bounding boxes - std::vector m_boxes{}; + std::vector m_boxes; /** * Are there possibly multiple versions of the same object in diff --git a/contrib/libosmium/include/osmium/io/ids_output.hpp b/contrib/libosmium/include/osmium/io/ids_output.hpp index 3992642b0..fe09c5f59 100644 --- a/contrib/libosmium/include/osmium/io/ids_output.hpp +++ b/contrib/libosmium/include/osmium/io/ids_output.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/input_iterator.hpp b/contrib/libosmium/include/osmium/io/input_iterator.hpp index 4c6690d70..e8196268e 100644 --- a/contrib/libosmium/include/osmium/io/input_iterator.hpp +++ b/contrib/libosmium/include/osmium/io/input_iterator.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/o5m_input.hpp b/contrib/libosmium/include/osmium/io/o5m_input.hpp index 320651a94..e2df6fcd0 100644 --- a/contrib/libosmium/include/osmium/io/o5m_input.hpp +++ b/contrib/libosmium/include/osmium/io/o5m_input.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/opl_input.hpp b/contrib/libosmium/include/osmium/io/opl_input.hpp index be2914d3b..bde901863 100644 --- a/contrib/libosmium/include/osmium/io/opl_input.hpp +++ b/contrib/libosmium/include/osmium/io/opl_input.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/opl_output.hpp b/contrib/libosmium/include/osmium/io/opl_output.hpp index d79d14bb5..521dac34a 100644 --- a/contrib/libosmium/include/osmium/io/opl_output.hpp +++ b/contrib/libosmium/include/osmium/io/opl_output.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/output_iterator.hpp b/contrib/libosmium/include/osmium/io/output_iterator.hpp index 6c0445a4e..7aeb75089 100644 --- a/contrib/libosmium/include/osmium/io/output_iterator.hpp +++ b/contrib/libosmium/include/osmium/io/output_iterator.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/overwrite.hpp b/contrib/libosmium/include/osmium/io/overwrite.hpp index 0bec8d99f..37c011d3e 100644 --- a/contrib/libosmium/include/osmium/io/overwrite.hpp +++ b/contrib/libosmium/include/osmium/io/overwrite.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/pbf.hpp b/contrib/libosmium/include/osmium/io/pbf.hpp index f48659ff1..2205b9de9 100644 --- a/contrib/libosmium/include/osmium/io/pbf.hpp +++ b/contrib/libosmium/include/osmium/io/pbf.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/pbf_input.hpp b/contrib/libosmium/include/osmium/io/pbf_input.hpp index 1a1a4a4dd..e2a1f2b80 100644 --- a/contrib/libosmium/include/osmium/io/pbf_input.hpp +++ b/contrib/libosmium/include/osmium/io/pbf_input.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/pbf_output.hpp b/contrib/libosmium/include/osmium/io/pbf_output.hpp index 2a06e0903..83f1048b0 100644 --- a/contrib/libosmium/include/osmium/io/pbf_output.hpp +++ b/contrib/libosmium/include/osmium/io/pbf_output.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/reader.hpp b/contrib/libosmium/include/osmium/io/reader.hpp index 643ffcd0c..d6680555d 100644 --- a/contrib/libosmium/include/osmium/io/reader.hpp +++ b/contrib/libosmium/include/osmium/io/reader.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -92,7 +92,7 @@ namespace osmium { // The Reader::read() function reads from a queue of buffers which // can contain nested buffers. These nested buffers will be in // here, because read() can only return a single unnested buffer. - osmium::memory::Buffer m_back_buffers{}; + osmium::memory::Buffer m_back_buffers; osmium::io::File m_file; @@ -124,10 +124,10 @@ namespace osmium { detail::future_buffer_queue_type m_osmdata_queue; detail::queue_wrapper m_osmdata_queue_wrapper; - std::future m_header_future{}; - osmium::io::Header m_header{}; + std::future m_header_future; + osmium::io::Header m_header; - osmium::thread::thread_handler m_thread{}; + osmium::thread::thread_handler m_thread; osmium::osm_entity_bits::type m_read_which_entities = osmium::osm_entity_bits::all; osmium::io::read_meta m_read_metadata = osmium::io::read_meta::yes; @@ -368,7 +368,7 @@ namespace osmium { ~Reader() noexcept { try { close(); - } catch (...) { + } catch (...) { // NOLINT(bugprone-empty-catch) // Ignore any exceptions because destructor must not throw. } } diff --git a/contrib/libosmium/include/osmium/io/reader_iterator.hpp b/contrib/libosmium/include/osmium/io/reader_iterator.hpp index daff71a00..632cbbbe7 100644 --- a/contrib/libosmium/include/osmium/io/reader_iterator.hpp +++ b/contrib/libosmium/include/osmium/io/reader_iterator.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/reader_with_progress_bar.hpp b/contrib/libosmium/include/osmium/io/reader_with_progress_bar.hpp index c3bae9d65..88323488a 100644 --- a/contrib/libosmium/include/osmium/io/reader_with_progress_bar.hpp +++ b/contrib/libosmium/include/osmium/io/reader_with_progress_bar.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -91,7 +91,7 @@ namespace osmium { } inline InputIterator end(ReaderWithProgressBar& /*reader*/) { - return InputIterator(); + return {}; } } // namespace io diff --git a/contrib/libosmium/include/osmium/io/writer.hpp b/contrib/libosmium/include/osmium/io/writer.hpp index e23045cef..ecd4ea473 100644 --- a/contrib/libosmium/include/osmium/io/writer.hpp +++ b/contrib/libosmium/include/osmium/io/writer.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -109,15 +109,15 @@ namespace osmium { std::unique_ptr m_output{nullptr}; - osmium::memory::Buffer m_buffer{}; + osmium::memory::Buffer m_buffer; osmium::io::Header m_header; size_t m_buffer_size = default_buffer_size; - std::future m_write_future{}; + std::future m_write_future; - osmium::thread::thread_handler m_thread{}; + osmium::thread::thread_handler m_thread; // Checking the m_write_future is much more expensive then checking // one atomic bool, so we set this bool in the write_thread when @@ -308,7 +308,7 @@ namespace osmium { ~Writer() noexcept { try { do_close(); - } catch (...) { + } catch (...) { // NOLINT(bugprone-empty-catch) // Ignore any exceptions because destructor must not throw. } } diff --git a/contrib/libosmium/include/osmium/io/writer_options.hpp b/contrib/libosmium/include/osmium/io/writer_options.hpp index 26d7ff44f..dddb2918e 100644 --- a/contrib/libosmium/include/osmium/io/writer_options.hpp +++ b/contrib/libosmium/include/osmium/io/writer_options.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/xml_input.hpp b/contrib/libosmium/include/osmium/io/xml_input.hpp index 7101d6291..8681a4736 100644 --- a/contrib/libosmium/include/osmium/io/xml_input.hpp +++ b/contrib/libosmium/include/osmium/io/xml_input.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/io/xml_output.hpp b/contrib/libosmium/include/osmium/io/xml_output.hpp index 3420e3182..3110c4317 100644 --- a/contrib/libosmium/include/osmium/io/xml_output.hpp +++ b/contrib/libosmium/include/osmium/io/xml_output.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/memory/buffer.hpp b/contrib/libosmium/include/osmium/memory/buffer.hpp index e51f5deb3..a1fe3c168 100644 --- a/contrib/libosmium/include/osmium/memory/buffer.hpp +++ b/contrib/libosmium/include/osmium/memory/buffer.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -104,7 +104,7 @@ namespace osmium { private: std::unique_ptr m_next_buffer; - std::unique_ptr m_memory{}; + std::unique_ptr m_memory; unsigned char* m_data = nullptr; std::size_t m_capacity = 0; std::size_t m_written = 0; diff --git a/contrib/libosmium/include/osmium/memory/callback_buffer.hpp b/contrib/libosmium/include/osmium/memory/callback_buffer.hpp index 76fea0594..4c55b8146 100644 --- a/contrib/libosmium/include/osmium/memory/callback_buffer.hpp +++ b/contrib/libosmium/include/osmium/memory/callback_buffer.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/memory/collection.hpp b/contrib/libosmium/include/osmium/memory/collection.hpp index e30113fbc..01b127dc3 100644 --- a/contrib/libosmium/include/osmium/memory/collection.hpp +++ b/contrib/libosmium/include/osmium/memory/collection.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -49,7 +49,7 @@ namespace osmium { // This data_type is either 'unsigned char*' or 'const unsigned // char*' depending on whether TMember is const. This allows this // class to be used as an iterator and as a const_iterator. - using data_type = typename std::conditional::value, const unsigned char*, unsigned char*>::type; + using data_type = std::conditional_t::value, const unsigned char*, unsigned char*>; data_type m_data; diff --git a/contrib/libosmium/include/osmium/memory/item.hpp b/contrib/libosmium/include/osmium/memory/item.hpp index a262371dd..19e9e5bcb 100644 --- a/contrib/libosmium/include/osmium/memory/item.hpp +++ b/contrib/libosmium/include/osmium/memory/item.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -61,7 +61,7 @@ namespace osmium { align_bytes = 8UL }; - inline constexpr std::size_t padded_length(std::size_t length) noexcept { + constexpr std::size_t padded_length(std::size_t length) noexcept { return (length + align_bytes - 1) & ~(align_bytes - 1); } diff --git a/contrib/libosmium/include/osmium/memory/item_iterator.hpp b/contrib/libosmium/include/osmium/memory/item_iterator.hpp index 348d52a73..132bb8ea2 100644 --- a/contrib/libosmium/include/osmium/memory/item_iterator.hpp +++ b/contrib/libosmium/include/osmium/memory/item_iterator.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -49,7 +49,7 @@ namespace osmium { namespace detail { template - constexpr inline bool type_is_compatible(const osmium::item_type t) noexcept { + constexpr bool type_is_compatible(const osmium::item_type t) noexcept { return T::is_compatible_to(t); } @@ -63,7 +63,7 @@ namespace osmium { // This data_type is either 'unsigned char*' or 'const unsigned char*' depending // on whether TMember is const. This allows this class to be used as an iterator and // as a const_iterator. - using data_type = typename std::conditional::value, const unsigned char*, unsigned char*>::type; + using data_type = std::conditional_t::value, const unsigned char*, unsigned char*>; data_type m_data; data_type m_end; @@ -179,7 +179,7 @@ namespace osmium { // This data_type is either 'unsigned char*' or // 'const unsigned char*' depending on whether T is const. - using data_type = typename std::conditional::value, const unsigned char*, unsigned char*>::type; + using data_type = std::conditional_t::value, const unsigned char*, unsigned char*>; data_type m_begin; data_type m_end; diff --git a/contrib/libosmium/include/osmium/object_pointer_collection.hpp b/contrib/libosmium/include/osmium/object_pointer_collection.hpp index 3cd0ed6ca..4a03f5a42 100644 --- a/contrib/libosmium/include/osmium/object_pointer_collection.hpp +++ b/contrib/libosmium/include/osmium/object_pointer_collection.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -90,7 +90,7 @@ namespace osmium { */ class ObjectPointerCollection : public osmium::handler::Handler { - std::vector m_objects{}; + std::vector m_objects; public: diff --git a/contrib/libosmium/include/osmium/opl.hpp b/contrib/libosmium/include/osmium/opl.hpp index 2f9b85af4..d4d280241 100644 --- a/contrib/libosmium/include/osmium/opl.hpp +++ b/contrib/libosmium/include/osmium/opl.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm.hpp b/contrib/libosmium/include/osmium/osm.hpp index f1f956e6f..23e2b7537 100644 --- a/contrib/libosmium/include/osmium/osm.hpp +++ b/contrib/libosmium/include/osmium/osm.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/area.hpp b/contrib/libosmium/include/osmium/osm/area.hpp index fcaf0f8cf..1d3fa603a 100644 --- a/contrib/libosmium/include/osmium/osm/area.hpp +++ b/contrib/libosmium/include/osmium/osm/area.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/box.hpp b/contrib/libosmium/include/osmium/osm/box.hpp index f477a4f81..5ad763932 100644 --- a/contrib/libosmium/include/osmium/osm/box.hpp +++ b/contrib/libosmium/include/osmium/osm/box.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -48,8 +48,8 @@ namespace osmium { */ class Box { - osmium::Location m_bottom_left{}; - osmium::Location m_top_right{}; + osmium::Location m_bottom_left; + osmium::Location m_top_right; public: @@ -248,7 +248,7 @@ namespace osmium { * Boxes are equal if both locations are equal. Undefined boxes will * compare equal. */ - inline constexpr bool operator==(const Box& lhs, const Box& rhs) noexcept { + constexpr bool operator==(const Box& lhs, const Box& rhs) noexcept { return lhs.bottom_left() == rhs.bottom_left() && lhs.top_right() == rhs.top_right(); } diff --git a/contrib/libosmium/include/osmium/osm/changeset.hpp b/contrib/libosmium/include/osmium/osm/changeset.hpp index ea678628a..bf9030d96 100644 --- a/contrib/libosmium/include/osmium/osm/changeset.hpp +++ b/contrib/libosmium/include/osmium/osm/changeset.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/crc.hpp b/contrib/libosmium/include/osmium/osm/crc.hpp index 88441cae2..508e361f6 100644 --- a/contrib/libosmium/include/osmium/osm/crc.hpp +++ b/contrib/libosmium/include/osmium/osm/crc.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/crc_zlib.hpp b/contrib/libosmium/include/osmium/osm/crc_zlib.hpp index be9e6a5c1..3b300463a 100644 --- a/contrib/libosmium/include/osmium/osm/crc_zlib.hpp +++ b/contrib/libosmium/include/osmium/osm/crc_zlib.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/diff_object.hpp b/contrib/libosmium/include/osmium/osm/diff_object.hpp index adf8006a7..393234250 100644 --- a/contrib/libosmium/include/osmium/osm/diff_object.hpp +++ b/contrib/libosmium/include/osmium/osm/diff_object.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/entity.hpp b/contrib/libosmium/include/osmium/osm/entity.hpp index f2a04e698..16534c78b 100644 --- a/contrib/libosmium/include/osmium/osm/entity.hpp +++ b/contrib/libosmium/include/osmium/osm/entity.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/entity_bits.hpp b/contrib/libosmium/include/osmium/osm/entity_bits.hpp index 6c84bef8d..f082cd9f9 100644 --- a/contrib/libosmium/include/osmium/osm/entity_bits.hpp +++ b/contrib/libosmium/include/osmium/osm/entity_bits.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -67,9 +67,18 @@ namespace osmium { nothing = 0x00, node = 0x01, way = 0x02, + nw = 0x03, ///< node or way object relation = 0x04, + nr = 0x05, ///< node or relation object + wr = 0x06, ///< way or relation object nwr = 0x07, ///< node, way, or relation object area = 0x08, + na = 0x09, ///< node or area object + wa = 0x0a, ///< way or area object + nwa = 0x0b, ///< node, way or area object + ra = 0x0c, ///< relation or area object + nra = 0x0d, ///< node, relation or area object + wra = 0x0e, ///< way, relation or area object nwra = 0x0f, ///< node, way, relation, or area object object = 0x0f, ///< node, way, relation, or area object changeset = 0x10, @@ -77,15 +86,15 @@ namespace osmium { }; // enum type - inline constexpr type operator|(const type lhs, const type rhs) noexcept { + constexpr type operator|(const type lhs, const type rhs) noexcept { return static_cast(static_cast(lhs) | static_cast(rhs)); } - inline constexpr type operator&(const type lhs, const type rhs) noexcept { + constexpr type operator&(const type lhs, const type rhs) noexcept { return static_cast(static_cast(lhs) & static_cast(rhs)); } - inline constexpr type operator~(const type value) noexcept { + constexpr type operator~(const type value) noexcept { return all & static_cast(~static_cast(value)); } @@ -106,7 +115,7 @@ namespace osmium { * changeset. */ inline type from_item_type(osmium::item_type item_type) noexcept { - const auto ut = static_cast::type>(item_type); + const auto ut = static_cast>(item_type); assert(ut <= 0x05); if (ut == 0) { return nothing; diff --git a/contrib/libosmium/include/osmium/osm/item_type.hpp b/contrib/libosmium/include/osmium/osm/item_type.hpp index c10eca7d6..3556bb4f0 100644 --- a/contrib/libosmium/include/osmium/osm/item_type.hpp +++ b/contrib/libosmium/include/osmium/osm/item_type.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/location.hpp b/contrib/libosmium/include/osmium/osm/location.hpp index a18855472..2fcf75f30 100644 --- a/contrib/libosmium/include/osmium/osm/location.hpp +++ b/contrib/libosmium/include/osmium/osm/location.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -490,11 +490,11 @@ namespace osmium { /** * Locations are equal if both coordinates are equal. */ - inline constexpr bool operator==(const Location& lhs, const Location& rhs) noexcept { + constexpr bool operator==(const Location& lhs, const Location& rhs) noexcept { return lhs.x() == rhs.x() && lhs.y() == rhs.y(); } - inline constexpr bool operator!=(const Location& lhs, const Location& rhs) noexcept { + constexpr bool operator!=(const Location& lhs, const Location& rhs) noexcept { return !(lhs == rhs); } @@ -503,19 +503,19 @@ namespace osmium { * the y coordinate. If either of the locations is * undefined the result is undefined. */ - inline constexpr bool operator<(const Location& lhs, const Location& rhs) noexcept { + constexpr bool operator<(const Location& lhs, const Location& rhs) noexcept { return (lhs.x() == rhs.x() && lhs.y() < rhs.y()) || lhs.x() < rhs.x(); } - inline constexpr bool operator>(const Location& lhs, const Location& rhs) noexcept { + constexpr bool operator>(const Location& lhs, const Location& rhs) noexcept { return rhs < lhs; } - inline constexpr bool operator<=(const Location& lhs, const Location& rhs) noexcept { + constexpr bool operator<=(const Location& lhs, const Location& rhs) noexcept { return !(rhs < lhs); } - inline constexpr bool operator>=(const Location& lhs, const Location& rhs) noexcept { + constexpr bool operator>=(const Location& lhs, const Location& rhs) noexcept { return !(lhs < rhs); } diff --git a/contrib/libosmium/include/osmium/osm/metadata_options.hpp b/contrib/libosmium/include/osmium/osm/metadata_options.hpp index 683d81654..85d05fea3 100644 --- a/contrib/libosmium/include/osmium/osm/metadata_options.hpp +++ b/contrib/libosmium/include/osmium/osm/metadata_options.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/node.hpp b/contrib/libosmium/include/osmium/osm/node.hpp index e09243312..fa3544f66 100644 --- a/contrib/libosmium/include/osmium/osm/node.hpp +++ b/contrib/libosmium/include/osmium/osm/node.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/node_ref.hpp b/contrib/libosmium/include/osmium/osm/node_ref.hpp index 06f9cc0d3..bb8138f0c 100644 --- a/contrib/libosmium/include/osmium/osm/node_ref.hpp +++ b/contrib/libosmium/include/osmium/osm/node_ref.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -150,7 +150,7 @@ namespace osmium { /** * Compare two NodeRefs. They are equal if they reference the same Node ID. */ - inline constexpr bool operator==(const NodeRef& lhs, const NodeRef& rhs) noexcept { + constexpr bool operator==(const NodeRef& lhs, const NodeRef& rhs) noexcept { return lhs.ref() == rhs.ref(); } @@ -158,7 +158,7 @@ namespace osmium { * Compare two NodeRefs. They are not equal if they reference different * Node IDs. */ - inline constexpr bool operator!=(const NodeRef& lhs, const NodeRef& rhs) noexcept { + constexpr bool operator!=(const NodeRef& lhs, const NodeRef& rhs) noexcept { return !(lhs == rhs); } @@ -166,7 +166,7 @@ namespace osmium { * Compare two NodeRefs. NodeRefs are ordered according to the Node ID * they reference. */ - inline constexpr bool operator<(const NodeRef& lhs, const NodeRef& rhs) noexcept { + constexpr bool operator<(const NodeRef& lhs, const NodeRef& rhs) noexcept { return lhs.ref() < rhs.ref(); } @@ -174,7 +174,7 @@ namespace osmium { * Compare two NodeRefs. NodeRefs are ordered according to the Node ID * they reference. */ - inline constexpr bool operator>(const NodeRef& lhs, const NodeRef& rhs) noexcept { + constexpr bool operator>(const NodeRef& lhs, const NodeRef& rhs) noexcept { return rhs < lhs; } @@ -182,7 +182,7 @@ namespace osmium { * Compare two NodeRefs. NodeRefs are ordered according to the Node ID * they reference. */ - inline constexpr bool operator<=(const NodeRef& lhs, const NodeRef& rhs) noexcept { + constexpr bool operator<=(const NodeRef& lhs, const NodeRef& rhs) noexcept { return !(rhs < lhs); } @@ -190,7 +190,7 @@ namespace osmium { * Compare two NodeRefs. NodeRefs are ordered according to the Node ID * they reference. */ - inline constexpr bool operator>=(const NodeRef& lhs, const NodeRef& rhs) noexcept { + constexpr bool operator>=(const NodeRef& lhs, const NodeRef& rhs) noexcept { return !(lhs < rhs); } diff --git a/contrib/libosmium/include/osmium/osm/node_ref_list.hpp b/contrib/libosmium/include/osmium/osm/node_ref_list.hpp index 6d7c67b77..ba8bbe3e0 100644 --- a/contrib/libosmium/include/osmium/osm/node_ref_list.hpp +++ b/contrib/libosmium/include/osmium/osm/node_ref_list.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/object.hpp b/contrib/libosmium/include/osmium/osm/object.hpp index a62c7603a..38c17f244 100644 --- a/contrib/libosmium/include/osmium/osm/object.hpp +++ b/contrib/libosmium/include/osmium/osm/object.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -69,7 +69,7 @@ namespace osmium { object_id_type m_id = 0; bool m_deleted : 1; object_version_type m_version : 31; - osmium::Timestamp m_timestamp{}; + osmium::Timestamp m_timestamp; user_id_type m_uid = 0; changeset_id_type m_changeset = 0; diff --git a/contrib/libosmium/include/osmium/osm/object_comparisons.hpp b/contrib/libosmium/include/osmium/osm/object_comparisons.hpp index fe14ffd41..eff811fd0 100644 --- a/contrib/libosmium/include/osmium/osm/object_comparisons.hpp +++ b/contrib/libosmium/include/osmium/osm/object_comparisons.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -160,9 +160,11 @@ namespace osmium { bool operator()(const osmium::OSMObject& lhs, const osmium::OSMObject& rhs) const noexcept { return const_tie(lhs.type(), lhs.id() > 0, lhs.positive_id(), rhs.version(), - ((lhs.timestamp().valid() && rhs.timestamp().valid()) ? rhs.timestamp() : osmium::Timestamp())) < + ((lhs.timestamp().valid() && rhs.timestamp().valid()) ? rhs.timestamp() : osmium::Timestamp()), + rhs.visible()) < const_tie(rhs.type(), rhs.id() > 0, rhs.positive_id(), lhs.version(), - ((lhs.timestamp().valid() && rhs.timestamp().valid()) ? lhs.timestamp() : osmium::Timestamp())); + ((lhs.timestamp().valid() && rhs.timestamp().valid()) ? lhs.timestamp() : osmium::Timestamp()), + lhs.visible()); } /// @pre lhs and rhs must not be nullptr diff --git a/contrib/libosmium/include/osmium/osm/relation.hpp b/contrib/libosmium/include/osmium/osm/relation.hpp index d848e6a08..c457b5fae 100644 --- a/contrib/libosmium/include/osmium/osm/relation.hpp +++ b/contrib/libosmium/include/osmium/osm/relation.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/segment.hpp b/contrib/libosmium/include/osmium/osm/segment.hpp index 403c24485..04598d180 100644 --- a/contrib/libosmium/include/osmium/osm/segment.hpp +++ b/contrib/libosmium/include/osmium/osm/segment.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -75,11 +75,11 @@ namespace osmium { }; // class Segment /// Segments are equal if both their locations are equal - inline constexpr bool operator==(const Segment& lhs, const Segment& rhs) noexcept { + constexpr bool operator==(const Segment& lhs, const Segment& rhs) noexcept { return lhs.first() == rhs.first() && lhs.second() == rhs.second(); } - inline constexpr bool operator!=(const Segment& lhs, const Segment& rhs) noexcept { + constexpr bool operator!=(const Segment& lhs, const Segment& rhs) noexcept { return !(lhs == rhs); } diff --git a/contrib/libosmium/include/osmium/osm/tag.hpp b/contrib/libosmium/include/osmium/osm/tag.hpp index ac2d0f0c4..e1538a9ae 100644 --- a/contrib/libosmium/include/osmium/osm/tag.hpp +++ b/contrib/libosmium/include/osmium/osm/tag.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/timestamp.hpp b/contrib/libosmium/include/osmium/osm/timestamp.hpp index e6cf1c458..f91747448 100644 --- a/contrib/libosmium/include/osmium/osm/timestamp.hpp +++ b/contrib/libosmium/include/osmium/osm/timestamp.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -220,7 +220,7 @@ namespace osmium { * The constructor is not declared "explicit" so that conversions * like @code node.set_timestamp(123); @endcode work. */ - template ::value, int>::type = 0> + template ::value, int> = 0> constexpr Timestamp(T timestamp) noexcept : // NOLINT(google-explicit-constructor, hicpp-explicit-conversions) m_timestamp(static_cast(timestamp)) { } @@ -317,7 +317,7 @@ namespace osmium { * A special Timestamp guaranteed to be ordered before any other valid * Timestamp. */ - inline constexpr Timestamp start_of_time() noexcept { + constexpr Timestamp start_of_time() noexcept { return {1}; } @@ -325,7 +325,7 @@ namespace osmium { * A special Timestamp guaranteed to be ordered after any other valid * Timestamp. */ - inline constexpr Timestamp end_of_time() noexcept { + constexpr Timestamp end_of_time() noexcept { return {std::numeric_limits::max()}; } diff --git a/contrib/libosmium/include/osmium/osm/types.hpp b/contrib/libosmium/include/osmium/osm/types.hpp index f206cac96..154329d7a 100644 --- a/contrib/libosmium/include/osmium/osm/types.hpp +++ b/contrib/libosmium/include/osmium/osm/types.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/types_from_string.hpp b/contrib/libosmium/include/osmium/osm/types_from_string.hpp index fc9c41a4e..8471a7f16 100644 --- a/contrib/libosmium/include/osmium/osm/types_from_string.hpp +++ b/contrib/libosmium/include/osmium/osm/types_from_string.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/undirected_segment.hpp b/contrib/libosmium/include/osmium/osm/undirected_segment.hpp index e34b5e4c6..ad68e2f0b 100644 --- a/contrib/libosmium/include/osmium/osm/undirected_segment.hpp +++ b/contrib/libosmium/include/osmium/osm/undirected_segment.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/osm/way.hpp b/contrib/libosmium/include/osmium/osm/way.hpp index 54ef617e1..71f535910 100644 --- a/contrib/libosmium/include/osmium/osm/way.hpp +++ b/contrib/libosmium/include/osmium/osm/way.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/relations/collector.hpp b/contrib/libosmium/include/osmium/relations/collector.hpp index ac44ddab8..e61574936 100644 --- a/contrib/libosmium/include/osmium/relations/collector.hpp +++ b/contrib/libosmium/include/osmium/relations/collector.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/relations/detail/member_meta.hpp b/contrib/libosmium/include/osmium/relations/detail/member_meta.hpp index b1242f01e..3df887b66 100644 --- a/contrib/libosmium/include/osmium/relations/detail/member_meta.hpp +++ b/contrib/libosmium/include/osmium/relations/detail/member_meta.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/relations/detail/relation_meta.hpp b/contrib/libosmium/include/osmium/relations/detail/relation_meta.hpp index ed639b7cc..87678a70f 100644 --- a/contrib/libosmium/include/osmium/relations/detail/relation_meta.hpp +++ b/contrib/libosmium/include/osmium/relations/detail/relation_meta.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/relations/manager_util.hpp b/contrib/libosmium/include/osmium/relations/manager_util.hpp index f49fb6c83..929c97dd5 100644 --- a/contrib/libosmium/include/osmium/relations/manager_util.hpp +++ b/contrib/libosmium/include/osmium/relations/manager_util.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/relations/members_database.hpp b/contrib/libosmium/include/osmium/relations/members_database.hpp index 028ede7aa..36f205d12 100644 --- a/contrib/libosmium/include/osmium/relations/members_database.hpp +++ b/contrib/libosmium/include/osmium/relations/members_database.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -135,7 +135,7 @@ namespace osmium { } }; - std::vector m_elements{}; + std::vector m_elements; protected: @@ -185,7 +185,7 @@ namespace osmium { * in the stash. Used for debugging. */ std::size_t used_memory() const noexcept { - return sizeof(element) * m_elements.capacity() + + return (sizeof(element) * m_elements.capacity()) + sizeof(MembersDatabaseCommon); } diff --git a/contrib/libosmium/include/osmium/relations/relations_database.hpp b/contrib/libosmium/include/osmium/relations/relations_database.hpp index f3492cb2e..a3b8573a8 100644 --- a/contrib/libosmium/include/osmium/relations/relations_database.hpp +++ b/contrib/libosmium/include/osmium/relations/relations_database.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -142,7 +142,7 @@ namespace osmium { * Complexity: Constant. */ std::size_t used_memory() const noexcept { - return sizeof(element) * m_elements.capacity() + + return (sizeof(element) * m_elements.capacity()) + sizeof(RelationsDatabase); } diff --git a/contrib/libosmium/include/osmium/relations/relations_manager.hpp b/contrib/libosmium/include/osmium/relations/relations_manager.hpp index edd6c0b0c..1bee78cce 100644 --- a/contrib/libosmium/include/osmium/relations/relations_manager.hpp +++ b/contrib/libosmium/include/osmium/relations/relations_manager.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -75,7 +75,7 @@ namespace osmium { // All relations and members we are interested in will be kept // in here. - osmium::ItemStash m_stash{}; + osmium::ItemStash m_stash; /// Database of all relations we are interested in. relations::RelationsDatabase m_relations_db; @@ -86,7 +86,7 @@ namespace osmium { relations::MembersDatabase m_member_relations_db; /// Output buffer. - osmium::memory::CallbackBuffer m_output{}; + osmium::memory::CallbackBuffer m_output; public: @@ -304,7 +304,7 @@ namespace osmium { template class RelationsManager : public RelationsManagerBase { - using check_order_handler = typename std::conditional::type; + using check_order_handler = std::conditional_t; check_order_handler m_check_order_handler; diff --git a/contrib/libosmium/include/osmium/storage/item_stash.hpp b/contrib/libosmium/include/osmium/storage/item_stash.hpp index fc1fbd0f0..e42836df9 100644 --- a/contrib/libosmium/include/osmium/storage/item_stash.hpp +++ b/contrib/libosmium/include/osmium/storage/item_stash.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -102,7 +102,7 @@ namespace osmium { * be printed as a unique (for an ItemStash object) number. */ template - friend inline std::basic_ostream& operator<<(std::basic_ostream& out, const ItemStash::handle_type& handle) { + friend inline std::basic_ostream& operator<<(std::basic_ostream& out, const ItemStash::handle_type& handle) { // NOLINT(readability-redundant-inline-specifier) if (handle.valid()) { out << handle.value; } else { @@ -208,7 +208,7 @@ namespace osmium { std::size_t used_memory() const noexcept { return sizeof(ItemStash) + m_buffer.capacity() + - m_index.capacity() * sizeof(std::size_t); + (m_index.capacity() * sizeof(std::size_t)); } /** diff --git a/contrib/libosmium/include/osmium/tags/filter.hpp b/contrib/libosmium/include/osmium/tags/filter.hpp index 0081f00ff..45c5e6d6b 100644 --- a/contrib/libosmium/include/osmium/tags/filter.hpp +++ b/contrib/libosmium/include/osmium/tags/filter.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -92,7 +92,7 @@ namespace osmium { class Filter { using key_type = TKey; - using value_type = typename std::conditional::value, bool, TValue>::type; + using value_type = std::conditional_t::value, bool, TValue>; struct Rule { key_type key; @@ -130,7 +130,7 @@ namespace osmium { m_default_result(default_result) { } - template ::value, int>::type = 0> + template ::value, int> = 0> Filter& add(bool result, const key_type& key, const value_type& value) { m_rules.emplace_back(result, false, key, value); return *this; diff --git a/contrib/libosmium/include/osmium/tags/matcher.hpp b/contrib/libosmium/include/osmium/tags/matcher.hpp index 42dd47aaa..50eb110c8 100644 --- a/contrib/libosmium/include/osmium/tags/matcher.hpp +++ b/contrib/libosmium/include/osmium/tags/matcher.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -72,8 +72,8 @@ namespace osmium { * * @param key_matcher StringMatcher for matching the key. */ - template ::value, void>::type> + template ::value, void>> explicit TagMatcher(TKey&& key_matcher) : m_key_matcher(std::forward(key_matcher)), m_value_matcher(osmium::StringMatcher::always_true{}) { @@ -88,8 +88,8 @@ namespace osmium { * @param invert If set to true, invert the result of the value_matcher. */ template ::value, int>::type = 0, - typename std::enable_if::value, int>::type = 0> + typename std::enable_if_t::value, int> = 0, + typename std::enable_if_t::value, int> = 0> TagMatcher(TKey&& key_matcher, TValue&& value_matcher, bool invert = false) : m_key_matcher(std::forward(key_matcher)), m_value_matcher(std::forward(value_matcher)), diff --git a/contrib/libosmium/include/osmium/tags/regex_filter.hpp b/contrib/libosmium/include/osmium/tags/regex_filter.hpp index 271212527..f741c31b3 100644 --- a/contrib/libosmium/include/osmium/tags/regex_filter.hpp +++ b/contrib/libosmium/include/osmium/tags/regex_filter.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/tags/taglist.hpp b/contrib/libosmium/include/osmium/tags/taglist.hpp index 7f2b433ba..d5ec309a3 100644 --- a/contrib/libosmium/include/osmium/tags/taglist.hpp +++ b/contrib/libosmium/include/osmium/tags/taglist.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/tags/tags_filter.hpp b/contrib/libosmium/include/osmium/tags/tags_filter.hpp index 81638dd19..61d20e20c 100644 --- a/contrib/libosmium/include/osmium/tags/tags_filter.hpp +++ b/contrib/libosmium/include/osmium/tags/tags_filter.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/thread/function_wrapper.hpp b/contrib/libosmium/include/osmium/thread/function_wrapper.hpp index a633c1f02..d0ec3509d 100644 --- a/contrib/libosmium/include/osmium/thread/function_wrapper.hpp +++ b/contrib/libosmium/include/osmium/thread/function_wrapper.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -87,8 +87,8 @@ namespace osmium { // Constructor must not be "explicit" for wrapper // to work seemlessly. - template ::value, void>::type> + template ::value, void>> // cppcheck-suppress noExplicitConstructor function_wrapper(TFunction&& f) : // NOLINT(google-explicit-constructor, hicpp-explicit-conversions) impl(new impl_type(std::forward(f))) { diff --git a/contrib/libosmium/include/osmium/thread/pool.hpp b/contrib/libosmium/include/osmium/thread/pool.hpp index 889113289..059f761d3 100644 --- a/contrib/libosmium/include/osmium/thread/pool.hpp +++ b/contrib/libosmium/include/osmium/thread/pool.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -120,7 +120,7 @@ namespace osmium { }; // class thread_joiner osmium::thread::Queue m_work_queue; - std::vector m_threads{}; + std::vector m_threads; thread_joiner m_joiner; int m_num_threads; @@ -225,7 +225,7 @@ namespace osmium { #else // For C++11 and C++14 template - using submit_func_result_type = typename std::result_of::type; + using submit_func_result_type = std::result_of_t; #endif template diff --git a/contrib/libosmium/include/osmium/thread/queue.hpp b/contrib/libosmium/include/osmium/thread/queue.hpp index ad7f3d2e8..950b60227 100644 --- a/contrib/libosmium/include/osmium/thread/queue.hpp +++ b/contrib/libosmium/include/osmium/thread/queue.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/thread/util.hpp b/contrib/libosmium/include/osmium/thread/util.hpp index b5a2ef10d..0817d93e1 100644 --- a/contrib/libosmium/include/osmium/thread/util.hpp +++ b/contrib/libosmium/include/osmium/thread/util.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/compatibility.hpp b/contrib/libosmium/include/osmium/util/compatibility.hpp index c37ef586d..1b6ac56d1 100644 --- a/contrib/libosmium/include/osmium/util/compatibility.hpp +++ b/contrib/libosmium/include/osmium/util/compatibility.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -33,15 +33,6 @@ DEALINGS IN THE SOFTWARE. */ -// [[deprecated]] is only available in C++14, use this for the time being -#ifdef __GNUC__ -# define OSMIUM_DEPRECATED __attribute__((deprecated)) -#elif defined(_MSC_VER) -# define OSMIUM_DEPRECATED __declspec(deprecated) -#else -# define OSMIUM_DEPRECATED -#endif - // Set OSMIUM_DEFINE_EXPORT before including any osmium headers to add // the special attributes to all exception classes. #ifdef OSMIUM_DEFINE_EXPORT diff --git a/contrib/libosmium/include/osmium/util/config.hpp b/contrib/libosmium/include/osmium/util/config.hpp index 44719f783..eaa887848 100644 --- a/contrib/libosmium/include/osmium/util/config.hpp +++ b/contrib/libosmium/include/osmium/util/config.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/delta.hpp b/contrib/libosmium/include/osmium/util/delta.hpp index d5df1e270..6033e6474 100644 --- a/contrib/libosmium/include/osmium/util/delta.hpp +++ b/contrib/libosmium/include/osmium/util/delta.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/double.hpp b/contrib/libosmium/include/osmium/util/double.hpp index 4275f1502..4e8dfb90b 100644 --- a/contrib/libosmium/include/osmium/util/double.hpp +++ b/contrib/libosmium/include/osmium/util/double.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/endian.hpp b/contrib/libosmium/include/osmium/util/endian.hpp index a6e191f4f..17be6a2ff 100644 --- a/contrib/libosmium/include/osmium/util/endian.hpp +++ b/contrib/libosmium/include/osmium/util/endian.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/file.hpp b/contrib/libosmium/include/osmium/util/file.hpp index 23c53db8a..1d7737e0c 100644 --- a/contrib/libosmium/include/osmium/util/file.hpp +++ b/contrib/libosmium/include/osmium/util/file.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -222,6 +222,22 @@ namespace osmium { return static_cast(offset); } + /** + * Set current offset into file. + * + * @param fd Open file descriptor. + * @param offset Desired absolute offset into the file + */ + inline void file_seek(int fd, std::size_t offset) noexcept { +#ifdef _MSC_VER + osmium::detail::disable_invalid_parameter_handler diph; + // https://msdn.microsoft.com/en-us/library/1yee101t.aspx + _lseeki64(fd, static_cast<__int64>(offset), SEEK_SET); +#else + ::lseek(fd, static_cast(offset), SEEK_SET); +#endif + } + /** * Check whether the file descriptor refers to a TTY. * diff --git a/contrib/libosmium/include/osmium/util/iterator.hpp b/contrib/libosmium/include/osmium/util/iterator.hpp index 9ee99a5ce..8fcb497e3 100644 --- a/contrib/libosmium/include/osmium/util/iterator.hpp +++ b/contrib/libosmium/include/osmium/util/iterator.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/memory.hpp b/contrib/libosmium/include/osmium/util/memory.hpp index 9e8996787..7ccb388c5 100644 --- a/contrib/libosmium/include/osmium/util/memory.hpp +++ b/contrib/libosmium/include/osmium/util/memory.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/memory_mapping.hpp b/contrib/libosmium/include/osmium/util/memory_mapping.hpp index f7059147b..38ca38ed7 100644 --- a/contrib/libosmium/include/osmium/util/memory_mapping.hpp +++ b/contrib/libosmium/include/osmium/util/memory_mapping.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -228,7 +228,7 @@ namespace osmium { ~MemoryMapping() noexcept { try { unmap(); - } catch (const std::system_error&) { + } catch (const std::system_error&) { // NOLINT(bugprone-empty-catch) // Ignore any exceptions because destructor must not throw. } } @@ -591,7 +591,7 @@ inline osmium::util::MemoryMapping::MemoryMapping(MemoryMapping&& other) noexcep inline osmium::util::MemoryMapping& osmium::util::MemoryMapping::operator=(osmium::util::MemoryMapping&& other) noexcept { try { unmap(); - } catch (const std::system_error&) { + } catch (const std::system_error&) { // NOLINT(bugprone-empty-catch) // Ignore unmap error. It should never happen anyway and we can't do // anything about it here. } @@ -761,7 +761,7 @@ inline osmium::util::MemoryMapping::MemoryMapping(MemoryMapping&& other) noexcep inline osmium::util::MemoryMapping& osmium::util::MemoryMapping::operator=(osmium::util::MemoryMapping&& other) noexcept { try { unmap(); - } catch (const std::system_error&) { + } catch (const std::system_error&) { // NOLINT(bugprone-empty-catch) // Ignore unmap error. It should never happen anyway and we can't do // anything about it here. } diff --git a/contrib/libosmium/include/osmium/util/minmax.hpp b/contrib/libosmium/include/osmium/util/minmax.hpp index a73e95afa..1f0931d4d 100644 --- a/contrib/libosmium/include/osmium/util/minmax.hpp +++ b/contrib/libosmium/include/osmium/util/minmax.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/misc.hpp b/contrib/libosmium/include/osmium/util/misc.hpp index 2088df237..824e57131 100644 --- a/contrib/libosmium/include/osmium/util/misc.hpp +++ b/contrib/libosmium/include/osmium/util/misc.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -69,7 +69,7 @@ namespace osmium { template inline TReturn str_to_int(const char* str) { static_assert(std::is_integral::value, "Must be integral type"); - using r_type = typename std::conditional::value, unsigned long long, long long>::type; // NOLINT(google-runtime-int) + using r_type = std::conditional_t::value, unsigned long long, long long>; // NOLINT(google-runtime-int) assert(str); char* end = nullptr; const auto value = std::strtoll(str, &end, 10); diff --git a/contrib/libosmium/include/osmium/util/options.hpp b/contrib/libosmium/include/osmium/util/options.hpp index 23bd38c78..a31d9084a 100644 --- a/contrib/libosmium/include/osmium/util/options.hpp +++ b/contrib/libosmium/include/osmium/util/options.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/progress_bar.hpp b/contrib/libosmium/include/osmium/util/progress_bar.hpp index 85aeefe54..13a6f0c36 100644 --- a/contrib/libosmium/include/osmium/util/progress_bar.hpp +++ b/contrib/libosmium/include/osmium/util/progress_bar.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/string.hpp b/contrib/libosmium/include/osmium/util/string.hpp index 7ca579fa2..2a1557e83 100644 --- a/contrib/libosmium/include/osmium/util/string.hpp +++ b/contrib/libosmium/include/osmium/util/string.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/string_matcher.hpp b/contrib/libosmium/include/osmium/util/string_matcher.hpp index 814c022dd..7a87cba0c 100644 --- a/contrib/libosmium/include/osmium/util/string_matcher.hpp +++ b/contrib/libosmium/include/osmium/util/string_matcher.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -419,8 +419,8 @@ namespace osmium { * equal, prefix, substring, regex or list. */ // cppcheck-suppress noExplicitConstructor - template ::value, void>::type> + template ::value, void>> StringMatcher(TMatcher&& matcher) : // NOLINT(google-explicit-constructor, hicpp-explicit-conversions) m_matcher(std::forward(matcher)) { } diff --git a/contrib/libosmium/include/osmium/util/timer.hpp b/contrib/libosmium/include/osmium/util/timer.hpp index 58ea1deb3..312c34536 100644 --- a/contrib/libosmium/include/osmium/util/timer.hpp +++ b/contrib/libosmium/include/osmium/util/timer.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/util/verbose_output.hpp b/contrib/libosmium/include/osmium/util/verbose_output.hpp index 680271cd7..cfc774307 100644 --- a/contrib/libosmium/include/osmium/util/verbose_output.hpp +++ b/contrib/libosmium/include/osmium/util/verbose_output.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/contrib/libosmium/include/osmium/version.hpp b/contrib/libosmium/include/osmium/version.hpp index 1ecfc3c7f..55d4ac103 100644 --- a/contrib/libosmium/include/osmium/version.hpp +++ b/contrib/libosmium/include/osmium/version.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -37,11 +37,11 @@ DEALINGS IN THE SOFTWARE. #define LIBOSMIUM_VERSION_MAJOR 2 // NOLINTNEXTLINE(modernize-macro-to-enum) -#define LIBOSMIUM_VERSION_MINOR 20 +#define LIBOSMIUM_VERSION_MINOR 21 // NOLINTNEXTLINE(modernize-macro-to-enum) #define LIBOSMIUM_VERSION_PATCH 0 -#define LIBOSMIUM_VERSION_STRING "2.20.0" +#define LIBOSMIUM_VERSION_STRING "2.21.0" #endif // OSMIUM_VERSION_HPP diff --git a/contrib/libosmium/include/osmium/visitor.hpp b/contrib/libosmium/include/osmium/visitor.hpp index c53eaf23c..9b0320c96 100644 --- a/contrib/libosmium/include/osmium/visitor.hpp +++ b/contrib/libosmium/include/osmium/visitor.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2023 Jochen Topf and others (see README). +Copyright 2013-2025 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -49,7 +49,7 @@ namespace osmium { namespace detail { template - using ConstIfConst = typename std::conditional::value, typename std::add_const::type, U>::type; + using ConstIfConst = std::conditional_t::value, std::add_const_t, U>; template inline void apply_item_impl(TItem& item, THandler&& handler) { @@ -286,18 +286,18 @@ namespace osmium { // Is the class T derived from osmium::handler::Handler? template - using is_handler = std::is_base_of::type>; + using is_handler = std::is_base_of>; // This is already a handler, use it as it is. - template ::value>::type> + template ::value>> T make_handler(T&& func) { return std::forward(func); } // This is not a handler, but a functor. Wrap a handler around it. - template ::value>::type> - wrapper_handler::type> make_handler(T&& func) { - return wrapper_handler::type>(std::forward(func)); + template ::value>> + wrapper_handler> make_handler(T&& func) { + return wrapper_handler>(std::forward(func)); } } // namespace detail