Skip to content

Commit

Permalink
Fix formating
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMarex committed Apr 4, 2018
1 parent b63f0ee commit 764f6e3
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
8 changes: 4 additions & 4 deletions include/engine/data_watchdog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}

Expand Down
4 changes: 2 additions & 2 deletions include/engine/engine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
3 changes: 2 additions & 1 deletion include/nodejs/node_osrm_support.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
5 changes: 2 additions & 3 deletions include/storage/shared_datatype.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down
2 changes: 1 addition & 1 deletion include/storage/shared_memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
7 changes: 4 additions & 3 deletions src/tools/store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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.");

Expand Down

0 comments on commit 764f6e3

Please sign in to comment.