We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a898ab commit 9a10207Copy full SHA for 9a10207
include/osmium/builder/osm_object_builder.hpp
@@ -349,12 +349,11 @@ namespace osmium {
349
350
// Get current comment pointer (recalculated each time to handle buffer reallocation)
351
osmium::ChangesetComment* get_comment_ptr() {
352
- if (!has_open_comment()) {
353
- return nullptr;
+ if (has_open_comment()) {
+ return &buffer().get<osmium::ChangesetComment>(
354
+ buffer().committed() + m_comment_offset);
355
}
- return reinterpret_cast<osmium::ChangesetComment*>(
356
- buffer().data() + buffer().committed() + m_comment_offset
357
- );
+ return nullptr;
358
359
360
public:
0 commit comments