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
+4 -4
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;
}
}
+2 -2
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())
+2 -1
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
{
+2 -3
View File
@@ -221,10 +221,9 @@ struct SharedRegionRegister
}
}
template<typename OutIter>
void List(OutIter out) const
template <typename OutIter> void List(OutIter out) const
{
for (const auto& region : regions)
for (const auto &region : regions)
{
if (!region.IsEmpty())
{
+1 -1
View File
@@ -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);
}