@@ -58,12 +58,13 @@ void osmdata_t::node(osmium::Node const &node)
5858
5959 if (node.deleted ()) {
6060 m_output->node_delete (node.id ());
61- } else {
62- if (m_append) {
63- node_modify (node);
64- } else {
65- node_add (node);
66- }
61+ return ;
62+ }
63+
64+ if (m_append) {
65+ node_modify (node);
66+ } else if (m_with_extra_attrs || !node.tags ().empty ()) {
67+ m_output->node_add (node);
6768 }
6869}
6970
@@ -79,12 +80,13 @@ void osmdata_t::way(osmium::Way &way)
7980
8081 if (way.deleted ()) {
8182 m_output->way_delete (way.id ());
82- } else {
83- if (m_append) {
84- way_modify (&way);
85- } else {
86- way_add (&way);
87- }
83+ return ;
84+ }
85+
86+ if (m_append) {
87+ way_modify (&way);
88+ } else if (m_with_extra_attrs || !way.tags ().empty ()) {
89+ m_output->way_add (&way);
8890 }
8991}
9092
@@ -111,38 +113,17 @@ void osmdata_t::relation(osmium::Relation const &rel)
111113
112114 if (rel.deleted ()) {
113115 m_output->relation_delete (rel.id ());
114- } else {
115- if (m_append) {
116- relation_modify (rel);
117- } else {
118- relation_add (rel);
119- }
120- }
121- }
122-
123- void osmdata_t::after_relations () { m_mid->after_relations (); }
124-
125- void osmdata_t::node_add (osmium::Node const &node) const
126- {
127- if (m_with_extra_attrs || !node.tags ().empty ()) {
128- m_output->node_add (node);
129- }
130- }
131-
132- void osmdata_t::way_add (osmium::Way *way) const
133- {
134- if (m_with_extra_attrs || !way->tags ().empty ()) {
135- m_output->way_add (way);
116+ return ;
136117 }
137- }
138-
139- void osmdata_t::relation_add (osmium::Relation const &rel) const
140- {
141- if (m_with_extra_attrs || !rel.tags ().empty ()) {
118+ if (m_append) {
119+ relation_modify (rel);
120+ } else if (m_with_extra_attrs || !rel.tags ().empty ()) {
142121 m_output->relation_add (rel);
143122 }
144123}
145124
125+ void osmdata_t::after_relations () { m_mid->after_relations (); }
126+
146127void osmdata_t::node_modify (osmium::Node const &node) const
147128{
148129 if (m_with_extra_attrs || !node.tags ().empty ()) {
0 commit comments