Skip to content

Commit

Permalink
Formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
joto committed Nov 30, 2018
1 parent 1dd2a9f commit 7b14860
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions include/osmium/io/detail/pbf_decoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ namespace osmium {
}

if (version == -1) {
object.set_version(0U);
object.set_version(0u);
} else {
object.set_version(static_cast<object_version_type>(version));
}
Expand All @@ -218,7 +218,7 @@ namespace osmium {
}

if (changeset_id == -1) {
object.set_changeset(0U);
object.set_changeset(0u);
} else {
object.set_changeset(static_cast<changeset_id_type>(changeset_id));
}
Expand Down Expand Up @@ -260,7 +260,7 @@ namespace osmium {
}
}

int32_t convert_pbf_coordinate(int64_t c) const noexcept {
int32_t convert_pbf_coordinate(const int64_t c) const noexcept {
return int32_t((c * m_granularity + m_lon_offset) / resolution_convert);
}

Expand Down Expand Up @@ -530,10 +530,10 @@ namespace osmium {
lons.drop_front();
const auto lat = dense_latitude.update(lats.front());
lats.drop_front();
builder.object().set_location(osmium::Location(
builder.object().set_location(osmium::Location{
convert_pbf_coordinate(lon),
convert_pbf_coordinate(lat)
));
});

if (tag_it != tags.end()) {
build_tag_list_from_dense_nodes(builder, tag_it, tags.end());
Expand Down Expand Up @@ -645,7 +645,7 @@ namespace osmium {
}

if (version == -1) {
node.set_version(0U);
node.set_version(0u);
} else {
node.set_version(static_cast<osmium::object_version_type>(version));
}
Expand All @@ -659,7 +659,7 @@ namespace osmium {
}

if (changeset_id == -1) {
node.set_changeset(0U);
node.set_changeset(0u);
} else {
node.set_changeset(static_cast<osmium::changeset_id_type>(changeset_id));
}
Expand Down Expand Up @@ -711,7 +711,7 @@ namespace osmium {

public:

PBFPrimitiveBlockDecoder(const data_view& data, osmium::osm_entity_bits::type read_types, osmium::io::read_meta read_metadata) :
PBFPrimitiveBlockDecoder(const data_view& data, const osmium::osm_entity_bits::type read_types, const osmium::io::read_meta read_metadata) :
m_data(data),
m_read_types(read_types),
m_read_metadata(read_metadata) {
Expand Down Expand Up @@ -815,8 +815,8 @@ namespace osmium {
}

osmium::Box box;
box.extend(osmium::Location(left / resolution_convert, bottom / resolution_convert));
box.extend(osmium::Location(right / resolution_convert, top / resolution_convert));
box.extend(osmium::Location{left / resolution_convert, bottom / resolution_convert});
box.extend(osmium::Location{right / resolution_convert, top / resolution_convert});

return box;
}
Expand Down Expand Up @@ -895,7 +895,7 @@ namespace osmium {

public:

PBFDataBlobDecoder(std::string&& input_buffer, osmium::osm_entity_bits::type read_types, osmium::io::read_meta read_metadata) :
PBFDataBlobDecoder(std::string&& input_buffer, const osmium::osm_entity_bits::type read_types, const osmium::io::read_meta read_metadata) :
m_input_buffer(std::make_shared<std::string>(std::move(input_buffer))),
m_read_types(read_types),
m_read_metadata(read_metadata) {
Expand Down
4 changes: 2 additions & 2 deletions include/osmium/memory/buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ namespace osmium {
using value_type = Item;

enum class auto_grow {
no = 0,
yes = 1,
no = 0,
yes = 1,
internal = 2
}; // enum class auto_grow

Expand Down

0 comments on commit 7b14860

Please sign in to comment.