Skip to content

Commit 95016bf

Browse files
committed
Use modern member initialization
1 parent 3dc2233 commit 95016bf

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

include/osmium/io/detail/input_format.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ namespace osmium {
7777
queue_wrapper<std::string> m_input_queue;
7878
osmium::osm_entity_bits::type m_read_which_entities;
7979
osmium::io::read_meta m_read_metadata;
80-
bool m_header_is_done;
80+
bool m_header_is_done = false;
8181

8282
protected:
8383

@@ -130,8 +130,7 @@ namespace osmium {
130130
m_header_promise(args.header_promise),
131131
m_input_queue(args.input_queue),
132132
m_read_which_entities(args.read_which_entities),
133-
m_read_metadata(args.read_metadata),
134-
m_header_is_done(false) {
133+
m_read_metadata(args.read_metadata) {
135134
}
136135

137136
Parser(const Parser&) = delete;

include/osmium/osm/changeset.hpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ namespace osmium {
6262

6363
osmium::Timestamp m_date;
6464
osmium::user_id_type m_uid = 0;
65-
changeset_comment_size_type m_text_size;
66-
string_size_type m_user_size;
65+
changeset_comment_size_type m_text_size = 0;
66+
string_size_type m_user_size = 0;
6767

6868
unsigned char* endpos() {
6969
return data() + osmium::memory::padded_length(sizeof(ChangesetComment) + m_user_size + m_text_size);
@@ -98,9 +98,7 @@ namespace osmium {
9898

9999
ChangesetComment(osmium::Timestamp date, osmium::user_id_type uid) noexcept :
100100
m_date(date),
101-
m_uid(uid),
102-
m_text_size(0),
103-
m_user_size(0) {
101+
m_uid(uid) {
104102
}
105103

106104
ChangesetComment(const ChangesetComment&) = delete;

0 commit comments

Comments
 (0)