diff --git a/include/engine/data_watchdog.hpp b/include/engine/data_watchdog.hpp index cf11337ad..09cf16218 100644 --- a/include/engine/data_watchdog.hpp +++ b/include/engine/data_watchdog.hpp @@ -52,7 +52,6 @@ class DataWatchdog const auto shared_timestamp = static_cast(shared_regions->Ptr()); - const auto get_locked_facade = [this, shared_timestamp]( const std::shared_ptr &facade) { if (current_timestamp.region == storage::REGION_1) @@ -117,10 +116,8 @@ class DataWatchdog current_timestamp = *shared_timestamp; } - auto new_facade = - std::make_shared(shared_barriers, - current_timestamp.region, - current_timestamp.timestamp); + auto new_facade = std::make_shared( + shared_barriers, current_timestamp.region, current_timestamp.timestamp); cached_facade = new_facade; return get_locked_facade(new_facade); diff --git a/include/engine/datafacade/shared_memory_datafacade.hpp b/include/engine/datafacade/shared_memory_datafacade.hpp index 6908af81a..f233e8dd4 100644 --- a/include/engine/datafacade/shared_memory_datafacade.hpp +++ b/include/engine/datafacade/shared_memory_datafacade.hpp @@ -72,7 +72,8 @@ class SharedMemoryDataFacade : public ContiguousInternalMemoryDataFacadeBase SharedMemoryDataFacade(const std::shared_ptr &shared_barriers_, storage::SharedDataType data_region_, unsigned shared_timestamp_) - : shared_barriers(shared_barriers_), data_region(data_region_), shared_timestamp(shared_timestamp_) + : shared_barriers(shared_barriers_), data_region(data_region_), + shared_timestamp(shared_timestamp_) { util::Log(logDEBUG) << "Loading new data with shared timestamp " << shared_timestamp; @@ -80,7 +81,8 @@ class SharedMemoryDataFacade : public ContiguousInternalMemoryDataFacadeBase m_large_memory = storage::makeSharedMemory(data_region); InitializeInternalPointers(*reinterpret_cast(m_large_memory->Ptr()), - reinterpret_cast(m_large_memory->Ptr()) + sizeof(storage::DataLayout)); + reinterpret_cast(m_large_memory->Ptr()) + + sizeof(storage::DataLayout)); } }; } diff --git a/include/extractor/guidance/intersection.hpp b/include/extractor/guidance/intersection.hpp index 82f27159a..0f3a4e1ee 100644 --- a/include/extractor/guidance/intersection.hpp +++ b/include/extractor/guidance/intersection.hpp @@ -14,9 +14,9 @@ #include "extractor/guidance/turn_instruction.hpp" -#include -#include #include +#include +#include namespace osrm { @@ -133,8 +133,7 @@ template struct EnableShapeOps // search a given eid in the intersection auto FindEid(const EdgeID eid) const { - return boost::range::find_if( - *self(), [eid](const auto &road) { return road.eid == eid; }); + return boost::range::find_if(*self(), [eid](const auto &road) { return road.eid == eid; }); } // find the maximum value based on a conversion operator @@ -247,8 +246,8 @@ template struct EnableIntersectionOps auto findClosestTurn(const double angle, const UnaryPredicate filter) const { BOOST_ASSERT(!self()->empty()); - const auto candidate = boost::range::min_element( - *self(), [angle, &filter](const auto &lhs, const auto &rhs) { + const auto candidate = + boost::range::min_element(*self(), [angle, &filter](const auto &lhs, const auto &rhs) { const auto filtered_lhs = filter(lhs), filtered_rhs = filter(rhs); const auto deviation_lhs = util::angularDeviation(lhs.angle, angle), deviation_rhs = util::angularDeviation(rhs.angle, angle); diff --git a/include/extractor/guidance/mergable_road_detector.hpp b/include/extractor/guidance/mergable_road_detector.hpp index f0c1552a0..db278b05d 100644 --- a/include/extractor/guidance/mergable_road_detector.hpp +++ b/include/extractor/guidance/mergable_road_detector.hpp @@ -13,10 +13,10 @@ namespace osrm { -//FWD declarations +// FWD declarations namespace util { - class NameTable; +class NameTable; } // namespace util namespace extractor @@ -30,7 +30,6 @@ namespace guidance class IntersectionGenerator; class CoordinateExtractor; - class MergableRoadDetector { public: diff --git a/src/extractor/guidance/mergable_road_detector.cpp b/src/extractor/guidance/mergable_road_detector.cpp index 98332f003..68a3061e9 100644 --- a/src/extractor/guidance/mergable_road_detector.cpp +++ b/src/extractor/guidance/mergable_road_detector.cpp @@ -312,7 +312,7 @@ bool MergableRoadDetector::HaveSameDirection(const NodeID intersection_node, */ const auto prune = [](auto &data_vector) { BOOST_ASSERT(data_vector.size() >= 3); - //erase the first third of the vector + // erase the first third of the vector data_vector.erase(data_vector.begin(), data_vector.begin() + data_vector.size() / 3); }; diff --git a/src/extractor/guidance/sliproad_handler.cpp b/src/extractor/guidance/sliproad_handler.cpp index 2163a4b2c..338d49edf 100644 --- a/src/extractor/guidance/sliproad_handler.cpp +++ b/src/extractor/guidance/sliproad_handler.cpp @@ -4,8 +4,8 @@ #include "util/coordinate_calculation.hpp" #include "util/guidance/name_announcements.hpp" -#include #include +#include #include #include diff --git a/src/extractor/guidance/turn_handler.cpp b/src/extractor/guidance/turn_handler.cpp index 8e48b8169..3e166b291 100644 --- a/src/extractor/guidance/turn_handler.cpp +++ b/src/extractor/guidance/turn_handler.cpp @@ -1,5 +1,5 @@ -#include "extractor/guidance/constants.hpp" #include "extractor/guidance/turn_handler.hpp" +#include "extractor/guidance/constants.hpp" #include "util/bearing.hpp" #include "util/guidance/name_announcements.hpp" diff --git a/src/storage/storage.cpp b/src/storage/storage.cpp index 777c6371f..bc7e9a6cb 100644 --- a/src/storage/storage.cpp +++ b/src/storage/storage.cpp @@ -73,10 +73,8 @@ RegionsLayout getRegionsLayout(SharedBarriers &barriers) static_cast(shared_region->Ptr()); if (shared_timestamp->region == REGION_1) { - return RegionsLayout{REGION_1, - barriers.region_1_mutex, - REGION_2, - barriers.region_2_mutex}; + return RegionsLayout{ + REGION_1, barriers.region_1_mutex, REGION_2, barriers.region_2_mutex}; } BOOST_ASSERT(shared_timestamp->region == REGION_2); diff --git a/src/tools/contract.cpp b/src/tools/contract.cpp index ab7a578ba..cd7f4c522 100644 --- a/src/tools/contract.cpp +++ b/src/tools/contract.cpp @@ -179,7 +179,7 @@ catch (const std::bad_alloc &e) util::Log(logERROR) << "Please provide more memory or consider using a larger swapfile"; return EXIT_FAILURE; } -catch (const std::exception& e) +catch (const std::exception &e) { std::cerr << "[exception] " << e.what(); return EXIT_FAILURE; diff --git a/src/tools/extract.cpp b/src/tools/extract.cpp index 16b09f182..1d3a4ced4 100644 --- a/src/tools/extract.cpp +++ b/src/tools/extract.cpp @@ -167,7 +167,7 @@ catch (const std::bad_alloc &e) util::Log(logERROR) << "Please provide more memory or consider using a larger swapfile"; return EXIT_FAILURE; } -catch (const std::exception& e) +catch (const std::exception &e) { std::cerr << "[exception] " << e.what(); return EXIT_FAILURE; diff --git a/src/tools/routed.cpp b/src/tools/routed.cpp index 088533d97..9f3bf2f4b 100644 --- a/src/tools/routed.cpp +++ b/src/tools/routed.cpp @@ -373,7 +373,7 @@ catch (const std::bad_alloc &e) util::Log(logWARNING) << "Please provide more memory or consider using a larger swapfile"; return EXIT_FAILURE; } -catch (const std::exception& e) +catch (const std::exception &e) { std::cerr << "[exception] " << e.what(); return EXIT_FAILURE; diff --git a/src/tools/store.cpp b/src/tools/store.cpp index 6729b35db..ada72e8ed 100644 --- a/src/tools/store.cpp +++ b/src/tools/store.cpp @@ -91,7 +91,7 @@ bool generateDataStoreOptions(const int argc, return true; } -[[ noreturn ]] void CleanupSharedBarriers(int signum) +[[noreturn]] void CleanupSharedBarriers(int signum) { // Here the lock state of named mutexes is unknown, make a hard cleanup osrm::storage::SharedBarriers::resetCurrentRegion(); std::_Exit(128 + signum);