diff --git a/include/engine/datafacade/shared_datafacade.hpp b/include/engine/datafacade/shared_datafacade.hpp index 12bce1842..ea20392e3 100644 --- a/include/engine/datafacade/shared_datafacade.hpp +++ b/include/engine/datafacade/shared_datafacade.hpp @@ -177,7 +177,8 @@ class SharedDataFacade final : public BaseDataFacade osmnodeid_list_ptr, data_layout->num_entries[storage::SharedDataLayout::OSM_NODE_ID_LIST]); // We (ab)use the number of coordinates here because we know we have the same amount of ids - m_osmnodeid_list.set_number_of_entries(data_layout->num_entries[storage::SharedDataLayout::COORDINATE_LIST]); + m_osmnodeid_list.set_number_of_entries( + data_layout->num_entries[storage::SharedDataLayout::COORDINATE_LIST]); auto travel_mode_list_ptr = data_layout->GetBlockPtr( shared_memory, storage::SharedDataLayout::TRAVEL_MODE); diff --git a/include/util/packed_vector.hpp b/include/util/packed_vector.hpp index d4a5ee852..c01655701 100644 --- a/include/util/packed_vector.hpp +++ b/include/util/packed_vector.hpp @@ -12,7 +12,6 @@ namespace osrm namespace util { - /** * Since OSM node IDs are (at the time of writing) not quite yet overflowing 32 bits, and * will predictably be containable within 33 bits for a long time, the following packs @@ -21,16 +20,16 @@ namespace util * NOTE: this type is templated for future use, but will require a slight refactor to * configure BITSIZE and ELEMSIZE */ -template class PackedVector +template class PackedVector { static const constexpr std::size_t BITSIZE = 33; static const constexpr std::size_t ELEMSIZE = 64; static const constexpr std::size_t PACKSIZE = BITSIZE * ELEMSIZE; public: - /** - * Returns the size of the packed vector datastructure with `elements` packed elements (the size of + * Returns the size of the packed vector datastructure with `elements` packed elements (the size + * of * its underlying uint64 vector) */ inline static std::size_t elements_to_blocks(std::size_t elements) diff --git a/src/engine/guidance/post_processing.cpp b/src/engine/guidance/post_processing.cpp index 83ca5b6ee..cb7a367dc 100644 --- a/src/engine/guidance/post_processing.cpp +++ b/src/engine/guidance/post_processing.cpp @@ -1,5 +1,5 @@ -#include "extractor/guidance/turn_instruction.hpp" #include "engine/guidance/post_processing.hpp" +#include "extractor/guidance/turn_instruction.hpp" #include "engine/guidance/assemble_steps.hpp" #include "engine/guidance/toolkit.hpp" diff --git a/src/engine/plugins/tile.cpp b/src/engine/plugins/tile.cpp index 4f1ce6473..c0c34e25f 100644 --- a/src/engine/plugins/tile.cpp +++ b/src/engine/plugins/tile.cpp @@ -244,8 +244,8 @@ Status TilePlugin::HandleRequest(const api::TileParameters ¶meters, std::str if (name_offsets.find(name) == name_offsets.end()) { - names.push_back(name); - name_offsets[name] = names.size() - 1; + names.push_back(name); + name_offsets[name] = names.size() - 1; } } @@ -328,14 +328,17 @@ Status TilePlugin::HandleRequest(const api::TileParameters ¶meters, std::str max_datasource_id = std::max(max_datasource_id, forward_datasource); max_datasource_id = std::max(max_datasource_id, reverse_datasource); - const auto encode_tile_line = [&layer_writer, &edge, &id, &max_datasource_id, &used_weights]( - const detail::FixedLine &tile_line, - const std::uint32_t speed_kmh, - const std::size_t duration, - const std::uint8_t datasource, - const std::size_t name, - std::int32_t &start_x, - std::int32_t &start_y) { + const auto encode_tile_line = [&layer_writer, + &edge, + &id, + &max_datasource_id, + &used_weights](const detail::FixedLine &tile_line, + const std::uint32_t speed_kmh, + const std::size_t duration, + const std::uint8_t datasource, + const std::size_t name, + std::int32_t &start_x, + std::int32_t &start_y) { // Here, we save the two attributes for our feature: the speed and the // is_small // boolean. We onl serve up speeds from 0-139, so all we do is save the @@ -369,10 +372,10 @@ Status TilePlugin::HandleRequest(const api::TileParameters ¶meters, std::str field.add_element(3); // "duration" tag key offset field.add_element(130 + max_datasource_id + 1 + duration); // duration value offset - field.add_element(4); // "name" tag key offset + field.add_element(4); // "name" tag key offset - field.add_element(130 + max_datasource_id + 1 + - used_weights.size() + name); // name value offset + field.add_element(130 + max_datasource_id + 1 + used_weights.size() + + name); // name value offset } { @@ -479,7 +482,7 @@ Status TilePlugin::HandleRequest(const api::TileParameters ¶meters, std::str values_writer.add_double(util::vector_tile::VARIANT_TYPE_DOUBLE, weight / 10.); } - for (const auto& name : names) + for (const auto &name : names) { // Writing field type 4 == variant type protozero::pbf_writer values_writer(layer_writer, util::vector_tile::VARIANT_TAG); diff --git a/src/extractor/guidance/motorway_handler.cpp b/src/extractor/guidance/motorway_handler.cpp index 8d562bcc5..4bf02fc87 100644 --- a/src/extractor/guidance/motorway_handler.cpp +++ b/src/extractor/guidance/motorway_handler.cpp @@ -1,6 +1,6 @@ +#include "extractor/guidance/motorway_handler.hpp" #include "extractor/guidance/classification_data.hpp" #include "extractor/guidance/constants.hpp" -#include "extractor/guidance/motorway_handler.hpp" #include "extractor/guidance/toolkit.hpp" #include "util/guidance/toolkit.hpp" diff --git a/src/extractor/guidance/roundabout_handler.cpp b/src/extractor/guidance/roundabout_handler.cpp index 2d0e54d95..c481d4c7b 100644 --- a/src/extractor/guidance/roundabout_handler.cpp +++ b/src/extractor/guidance/roundabout_handler.cpp @@ -1,5 +1,5 @@ -#include "extractor/guidance/constants.hpp" #include "extractor/guidance/roundabout_handler.hpp" +#include "extractor/guidance/constants.hpp" #include "extractor/guidance/toolkit.hpp" #include "util/coordinate_calculation.hpp" diff --git a/src/extractor/guidance/turn_analysis.cpp b/src/extractor/guidance/turn_analysis.cpp index 601773b93..0d7b02538 100644 --- a/src/extractor/guidance/turn_analysis.cpp +++ b/src/extractor/guidance/turn_analysis.cpp @@ -1,6 +1,6 @@ +#include "extractor/guidance/turn_analysis.hpp" #include "extractor/guidance/classification_data.hpp" #include "extractor/guidance/constants.hpp" -#include "extractor/guidance/turn_analysis.hpp" #include "util/coordinate.hpp" #include "util/coordinate_calculation.hpp" diff --git a/src/extractor/guidance/turn_handler.cpp b/src/extractor/guidance/turn_handler.cpp index ccb6559ae..1c770e236 100644 --- a/src/extractor/guidance/turn_handler.cpp +++ b/src/extractor/guidance/turn_handler.cpp @@ -1,7 +1,7 @@ +#include "extractor/guidance/turn_handler.hpp" #include "extractor/guidance/constants.hpp" #include "extractor/guidance/intersection_scenario_three_way.hpp" #include "extractor/guidance/toolkit.hpp" -#include "extractor/guidance/turn_handler.hpp" #include "util/guidance/toolkit.hpp" diff --git a/src/storage/storage.cpp b/src/storage/storage.cpp index 40309acc1..980cd333d 100644 --- a/src/storage/storage.cpp +++ b/src/storage/storage.cpp @@ -247,8 +247,9 @@ int Storage::Run() coordinate_list_size); // we'll read a list of OSM node IDs from the same data, so set the block size for the same // number of items: - shared_layout_ptr->SetBlockSize(SharedDataLayout::OSM_NODE_ID_LIST, - util::PackedVector::elements_to_blocks(coordinate_list_size)); + shared_layout_ptr->SetBlockSize( + SharedDataLayout::OSM_NODE_ID_LIST, + util::PackedVector::elements_to_blocks(coordinate_list_size)); // load geometries sizes boost::filesystem::ifstream geometry_input_stream(config.geometries_path, std::ios::binary);