Fix formating

This commit is contained in:
Patrick Niklaus 2018-04-04 22:56:47 +00:00 committed by Patrick Niklaus
parent c4b90f52c0
commit 4610fd9ff1
6 changed files with 15 additions and 14 deletions

View File

@ -46,8 +46,8 @@ class DataWatchdogImpl<AlgorithmT, datafacade::ContiguousInternalMemoryDataFacad
auto region_id = shared_register.Find(dataset_name + "/data");
if (region_id == storage::SharedRegionRegister::INVALID_REGION_ID)
{
throw util::exception(
"Could not find shared memory region for \"" + dataset_name +"/data\". Did you run osrm-datastore?");
throw util::exception("Could not find shared memory region for \"" + dataset_name +
"/data\". Did you run osrm-datastore?");
}
shared_region = &shared_register.GetRegion(region_id);
region = *shared_region;
@ -94,8 +94,8 @@ class DataWatchdogImpl<AlgorithmT, datafacade::ContiguousInternalMemoryDataFacad
facade_factory =
DataFacadeFactory<datafacade::ContiguousInternalMemoryDataFacade, AlgorithmT>(
std::make_shared<datafacade::SharedMemoryAllocator>(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;
}
}

View File

@ -59,8 +59,8 @@ template <typename Algorithm> 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<Algorithm>();
util::Log(logDEBUG) << "Using shared memory with name \"" << config.dataset_name
<< "\" with algorithm " << routing_algorithms::name<Algorithm>();
facade_provider = std::make_unique<WatchingProvider<Algorithm>>(config.dataset_name);
}
else if (!config.memory_file.empty())

View File

@ -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<v8::String>(dataset_name).ToLocalChecked());
engine_config->dataset_name =
*v8::String::Utf8Value(Nan::To<v8::String>(dataset_name).ToLocalChecked());
}
else
{

View File

@ -221,8 +221,7 @@ struct SharedRegionRegister
}
}
template<typename OutIter>
void List(OutIter out) const
template <typename OutIter> void List(OutIter out) const
{
for (const auto &region : regions)
{

View File

@ -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<bool>(&list_datasets)->default_value(false)->implicit_value(true),
boost::program_options::value<bool>(&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.");