Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/libosmium/README.contrib
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Source: https://github.com/osmcode/libosmium
Revision: v2.22.0
Revision: v2.23.0
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/area/assembler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/area/assembler_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
4 changes: 2 additions & 2 deletions contrib/libosmium/include/osmium/area/assembler_legacy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down Expand Up @@ -72,7 +72,7 @@ namespace osmium {
*/
class AssemblerLegacy : public detail::BasicAssemblerWithTags {

void add_common_tags(osmium::builder::TagListBuilder& tl_builder, std::set<const osmium::Way*>& ways) const {
void add_common_tags(osmium::builder::TagListBuilder& tl_builder, const std::set<const osmium::Way*>& ways) const {
std::map<std::string, std::size_t> counter;
for (const osmium::Way* way : ways) {
for (const auto& tag : way->tags()) {
Expand Down
12 changes: 6 additions & 6 deletions contrib/libosmium/include/osmium/area/detail/basic_assembler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down Expand Up @@ -290,7 +290,7 @@ namespace osmium {
}
}

ProtoRing* find_enclosing_ring(NodeRefSegment* segment) {
ProtoRing* find_enclosing_ring(NodeRefSegment const* segment) {
if (debug()) {
std::cerr << " Looking for ring enclosing " << *segment << "\n";
}
Expand Down Expand Up @@ -553,7 +553,7 @@ namespace osmium {
return;
}

std::stable_sort(rings.begin(), rings.end(), [](ProtoRing* a, ProtoRing* b) {
std::stable_sort(rings.begin(), rings.end(), [](ProtoRing const* a, ProtoRing const* b) {
return a->min_segment() < b->min_segment();
});

Expand Down Expand Up @@ -824,7 +824,7 @@ namespace osmium {
});

find_inner_outer_complex();
ProtoRing* outer_ring = find_enclosing_ring(ring_min->ring().min_segment());
const ProtoRing* outer_ring = find_enclosing_ring(ring_min->ring().min_segment());
const bool ring_min_is_outer = !outer_ring;
if (debug()) {
std::cerr << " Open ring is " << (ring_min_is_outer ? "outer" : "inner") << " ring\n";
Expand Down Expand Up @@ -858,7 +858,7 @@ namespace osmium {
if (!open_ring_its.empty()) {
++m_stats.open_rings;
if (m_config.problem_reporter) {
for (auto& it : open_ring_its) {
for (const auto& it : open_ring_its) {
m_config.problem_reporter->report_ring_not_closed(it->get_node_ref_start(), nullptr);
m_config.problem_reporter->report_ring_not_closed(it->get_node_ref_stop(), nullptr);
}
Expand Down Expand Up @@ -912,7 +912,7 @@ namespace osmium {
[this, &location](const slocation& lhs, const slocation& rhs) {
return lhs.location(m_segment_list, location) < rhs.location(m_segment_list, location);
}));
for (auto& loc : locs) {
for (const auto& loc : locs) {
if (!m_segment_list[loc.item].is_done()) {
count_remaining -= add_new_ring_complex(loc);
if (count_remaining == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
4 changes: 2 additions & 2 deletions contrib/libosmium/include/osmium/area/detail/proto_ring.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down Expand Up @@ -195,7 +195,7 @@ namespace osmium {
}
}

void join_forward(ProtoRing& other) {
void join_forward(const ProtoRing& other) {
m_segments.reserve(m_segments.size() + other.m_segments.size());
for (NodeRefSegment* segment : other.m_segments) {
add_segment_back(segment);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/area/detail/vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
This file is part of Osmium (https://osmcode.org/libosmium).
Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/area/geom_assembler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/area/problem_reporter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/area/stats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/builder/attr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/builder/builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
59 changes: 43 additions & 16 deletions contrib/libosmium/include/osmium/builder/osm_object_builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down Expand Up @@ -324,7 +324,7 @@ namespace osmium {

class ChangesetDiscussionBuilder : public Builder {

osmium::ChangesetComment* m_comment = nullptr;
std::size_t m_comment_offset = std::numeric_limits<std::size_t>::max();

void add_user(osmium::ChangesetComment& comment, const char* user, const std::size_t length) {
if (length > osmium::max_osm_string_length) {
Expand All @@ -343,6 +343,19 @@ namespace osmium {
add_padding(true);
}

bool has_open_comment() const noexcept {
return m_comment_offset != std::numeric_limits<std::size_t>::max();
}

// Get current comment pointer (recalculated each time to handle buffer reallocation)
osmium::ChangesetComment* get_comment_ptr() {
if (has_open_comment()) {
return &buffer().get<osmium::ChangesetComment>(
buffer().committed() + m_comment_offset);
}
return nullptr;
}

public:

explicit ChangesetDiscussionBuilder(osmium::memory::Buffer& buffer, Builder* parent = nullptr) :
Expand All @@ -362,32 +375,46 @@ namespace osmium {
ChangesetDiscussionBuilder& operator=(ChangesetDiscussionBuilder&&) = delete;

~ChangesetDiscussionBuilder() {
assert(!m_comment && "You have to always call both add_comment() and then add_comment_text() in that order for each comment!");
assert(!has_open_comment() && "You have to always call both add_comment() and then add_comment_text() in that order for each comment!");
add_padding();
}

void add_comment(osmium::Timestamp date, osmium::user_id_type uid, const char* user) {
assert(!m_comment && "You have to always call both add_comment() and then add_comment_text() in that order for each comment!");
m_comment = reserve_space_for<osmium::ChangesetComment>();
new (m_comment) osmium::ChangesetComment{date, uid};
assert(!has_open_comment() && "You have to always call both add_comment() and then add_comment_text() in that order for each comment!");

// Store offset instead of pointer to handle buffer reallocation
m_comment_offset = buffer().written() - buffer().committed();

auto* comment = reserve_space_for<osmium::ChangesetComment>();
new (comment) osmium::ChangesetComment{date, uid};
add_size(sizeof(ChangesetComment));
add_user(*m_comment, user, std::strlen(user));

add_user(*comment, user, std::strlen(user));
}

void add_comment_text(const char* text) {
assert(m_comment && "You have to always call both add_comment() and then add_comment_text() in that order for each comment!");
osmium::ChangesetComment& comment = *m_comment;
m_comment = nullptr;
add_text(comment, text, std::strlen(text));
assert(has_open_comment() && "You have to always call both add_comment() and then add_comment_text() in that order for each comment!");

// Get fresh pointer each time to handle buffer reallocation
auto* comment = get_comment_ptr();

// Invalidate offset to ensure right adding order
m_comment_offset = std::numeric_limits<std::size_t>::max();

add_text(*comment, text, std::strlen(text));
}

void add_comment_text(const std::string& text) {
assert(m_comment && "You have to always call both add_comment() and then add_comment_text() in that order for each comment!");
osmium::ChangesetComment& comment = *m_comment;
m_comment = nullptr;
add_text(comment, text.c_str(), text.size());
}
assert(has_open_comment() && "You have to always call both add_comment() and then add_comment_text() in that order for each comment!");

// Get fresh pointer each time to handle buffer reallocation
auto* comment = get_comment_ptr();

// Invalidate offset to ensure right adding order
m_comment_offset = std::numeric_limits<std::size_t>::max();

add_text(*comment, text.c_str(), text.size());
}
}; // class ChangesetDiscussionBuilder

#define OSMIUM_FORWARD(setter) \
Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/diff_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/diff_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/diff_visitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/dynamic_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
2 changes: 1 addition & 1 deletion contrib/libosmium/include/osmium/fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This file is part of Osmium (https://osmcode.org/libosmium).

Copyright 2013-2025 Jochen Topf <jochen@topf.org> and others (see README).
Copyright 2013-2026 Jochen Topf <jochen@topf.org> and others (see README).

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down
Loading