Skip to content

Commit 2f8e971

Browse files
committed
Remove redundant member initialization
1 parent 43a94ee commit 2f8e971

19 files changed

Lines changed: 40 additions & 40 deletions

include/osmium/area/detail/basic_assembler.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ namespace osmium {
7070

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

7676
location_to_ring_map(osmium::Location l, open_ring_its_type::iterator r, const bool s) noexcept :
@@ -703,7 +703,7 @@ namespace osmium {
703703

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

include/osmium/area/detail/node_ref_segment.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ namespace osmium {
7575
class NodeRefSegment {
7676

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

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

8383
// Way this segment was from.
8484
const osmium::Way* m_way = nullptr;

include/osmium/area/detail/proto_ring.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ namespace osmium {
6464
private:
6565

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

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

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

include/osmium/area/detail/segment_list.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ namespace osmium {
8484

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

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

8989
bool m_debug;
9090

include/osmium/io/detail/o5m_input_format.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ namespace osmium {
153153

154154
class O5mParser final : public ParserWithBuffer {
155155

156-
osmium::io::Header m_header{};
156+
osmium::io::Header m_header;
157157

158-
std::string m_input{};
158+
std::string m_input;
159159

160160
const char* m_data;
161161
const char* m_end;

include/osmium/io/detail/pbf_input_format.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ namespace osmium {
6565

6666
class PBFParser final : public Parser {
6767

68-
std::string m_input_buffer{};
68+
std::string m_input_buffer;
6969
std::atomic<std::size_t>* m_offset_ptr;
7070
int m_fd;
7171
bool m_want_buffered_pages_removed;

include/osmium/io/detail/pbf_output_format.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ namespace osmium {
275275
protozero::pbf_builder<OSMFormat::PrimitiveGroup> m_pbf_primitive_group;
276276
StringTable m_stringtable;
277277
pbf_output_options m_options;
278-
std::unique_ptr<DenseNodes> m_dense_nodes{};
278+
std::unique_ptr<DenseNodes> m_dense_nodes;
279279
OSMFormat::PrimitiveGroup m_type;
280280
int m_count = 0;
281281

@@ -366,7 +366,7 @@ namespace osmium {
366366

367367
class SerializeBlob {
368368

369-
std::shared_ptr<PrimitiveBlock> m_block{};
369+
std::shared_ptr<PrimitiveBlock> m_block;
370370

371371
std::string m_msg;
372372

@@ -482,7 +482,7 @@ namespace osmium {
482482

483483
pbf_output_options m_options;
484484

485-
std::shared_ptr<PrimitiveBlock> m_primitive_block{};
485+
std::shared_ptr<PrimitiveBlock> m_primitive_block;
486486

487487
std::size_t m_bucket_count = StringTable::min_bucket_count;
488488

include/osmium/io/detail/xml_input_format.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,17 @@ namespace osmium {
150150

151151
std::vector<context> m_context_stack;
152152

153-
osmium::io::Header m_header{};
153+
osmium::io::Header m_header;
154154

155-
std::unique_ptr<osmium::builder::NodeBuilder> m_node_builder{};
156-
std::unique_ptr<osmium::builder::WayBuilder> m_way_builder{};
157-
std::unique_ptr<osmium::builder::RelationBuilder> m_relation_builder{};
158-
std::unique_ptr<osmium::builder::ChangesetBuilder> m_changeset_builder{};
159-
std::unique_ptr<osmium::builder::ChangesetDiscussionBuilder> m_changeset_discussion_builder{};
155+
std::unique_ptr<osmium::builder::NodeBuilder> m_node_builder;
156+
std::unique_ptr<osmium::builder::WayBuilder> m_way_builder;
157+
std::unique_ptr<osmium::builder::RelationBuilder> m_relation_builder;
158+
std::unique_ptr<osmium::builder::ChangesetBuilder> m_changeset_builder;
159+
std::unique_ptr<osmium::builder::ChangesetDiscussionBuilder> m_changeset_discussion_builder;
160160

161-
std::unique_ptr<osmium::builder::TagListBuilder> m_tl_builder{};
162-
std::unique_ptr<osmium::builder::WayNodeListBuilder> m_wnl_builder{};
163-
std::unique_ptr<osmium::builder::RelationMemberListBuilder> m_rml_builder{};
161+
std::unique_ptr<osmium::builder::TagListBuilder> m_tl_builder;
162+
std::unique_ptr<osmium::builder::WayNodeListBuilder> m_wnl_builder;
163+
std::unique_ptr<osmium::builder::RelationMemberListBuilder> m_rml_builder;
164164

165165
std::string m_comment_text;
166166

include/osmium/io/file.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ namespace osmium {
7373

7474
private:
7575

76-
std::string m_filename{};
76+
std::string m_filename;
7777

7878
const char* m_buffer = nullptr;
7979
size_t m_buffer_size = 0;

include/osmium/io/header.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ namespace osmium {
6868
class Header : public osmium::Options {
6969

7070
/// Bounding boxes
71-
std::vector<osmium::Box> m_boxes{};
71+
std::vector<osmium::Box> m_boxes;
7272

7373
/**
7474
* Are there possibly multiple versions of the same object in

0 commit comments

Comments
 (0)