Fix formating
This commit is contained in:
parent
c4b90f52c0
commit
4610fd9ff1
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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())
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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 ®ion : regions)
|
||||
{
|
||||
if (!region.IsEmpty())
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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.");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user