From 4610fd9ff14740ccacce9bbcc5a4dbca96eba351 Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Wed, 4 Apr 2018 22:56:47 +0000 Subject: [PATCH] Fix formating --- include/engine/data_watchdog.hpp | 8 ++++---- include/engine/engine.hpp | 4 ++-- include/nodejs/node_osrm_support.hpp | 3 ++- include/storage/shared_datatype.hpp | 5 ++--- include/storage/shared_memory.hpp | 2 +- src/tools/store.cpp | 7 ++++--- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/include/engine/data_watchdog.hpp b/include/engine/data_watchdog.hpp index eaa18b87c..558cb15ed 100644 --- a/include/engine/data_watchdog.hpp +++ b/include/engine/data_watchdog.hpp @@ -46,8 +46,8 @@ class DataWatchdogImpl( std::make_shared(region.shm_key)); - util::Log() << "updated facade to region " << (int) region.shm_key << " with timestamp " - << region.timestamp; + util::Log() << "updated facade to region " << (int)region.shm_key + << " with timestamp " << region.timestamp; } } diff --git a/include/engine/engine.hpp b/include/engine/engine.hpp index 3b1a8b808..025dc2deb 100644 --- a/include/engine/engine.hpp +++ b/include/engine/engine.hpp @@ -59,8 +59,8 @@ template class Engine final : public EngineInterface { if (config.use_shared_memory) { - util::Log(logDEBUG) << "Using shared memory with name \"" << config.dataset_name << "\" with algorithm " - << routing_algorithms::name(); + util::Log(logDEBUG) << "Using shared memory with name \"" << config.dataset_name + << "\" with algorithm " << routing_algorithms::name(); facade_provider = std::make_unique>(config.dataset_name); } else if (!config.memory_file.empty()) diff --git a/include/nodejs/node_osrm_support.hpp b/include/nodejs/node_osrm_support.hpp index 5b8f4ad2d..2bad0a205 100644 --- a/include/nodejs/node_osrm_support.hpp +++ b/include/nodejs/node_osrm_support.hpp @@ -142,7 +142,8 @@ inline engine_config_ptr argumentsToEngineConfig(const Nan::FunctionCallbackInfo { if (dataset_name->IsString()) { - engine_config->dataset_name = *v8::String::Utf8Value(Nan::To(dataset_name).ToLocalChecked()); + engine_config->dataset_name = + *v8::String::Utf8Value(Nan::To(dataset_name).ToLocalChecked()); } else { diff --git a/include/storage/shared_datatype.hpp b/include/storage/shared_datatype.hpp index 1783297a4..6968d4222 100644 --- a/include/storage/shared_datatype.hpp +++ b/include/storage/shared_datatype.hpp @@ -221,10 +221,9 @@ struct SharedRegionRegister } } - template - void List(OutIter out) const + template void List(OutIter out) const { - for (const auto& region : regions) + for (const auto ®ion : regions) { if (!region.IsEmpty()) { diff --git a/include/storage/shared_memory.hpp b/include/storage/shared_memory.hpp index 0ebdcb136..6fdedfcef 100644 --- a/include/storage/shared_memory.hpp +++ b/include/storage/shared_memory.hpp @@ -63,7 +63,7 @@ class SharedMemory { shm = boost::interprocess::xsi_shared_memory(boost::interprocess::open_only, key); - util::Log(logDEBUG) << "opening " << (int) shm.get_shmid() << " from id " << (int) id; + util::Log(logDEBUG) << "opening " << (int)shm.get_shmid() << " from id " << (int)id; region = boost::interprocess::mapped_region(shm, boost::interprocess::read_only); } diff --git a/src/tools/store.cpp b/src/tools/store.cpp index f63b0397b..ad4d73066 100644 --- a/src/tools/store.cpp +++ b/src/tools/store.cpp @@ -37,8 +37,7 @@ void listRegions() { auto id = shared_register.Find(name); auto region = shared_register.GetRegion(id); - osrm::util::Log() << name << "\t" - << (int) region.shm_key << "\t" << region.timestamp; + osrm::util::Log() << name << "\t" << (int)region.shm_key << "\t" << region.timestamp; } } @@ -98,7 +97,9 @@ bool generateDataStoreOptions(const int argc, "Name of the dataset to load into memory. This allows having multiple datasets in memory " "at the same time.") // ("list", - boost::program_options::value(&list_datasets)->default_value(false)->implicit_value(true), + boost::program_options::value(&list_datasets) + ->default_value(false) + ->implicit_value(true), "Name of the dataset to load into memory. This allows having multiple datasets in memory " "at the same time.");