Skip to content

Commit

Permalink
Fix formating
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMarex committed Feb 8, 2018
1 parent b538030 commit ac6920e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
8 changes: 4 additions & 4 deletions src/benchmarks/alias.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int main(int, char **)
TIMER_START(aliased_u32);
for (auto round : util::irange(0, num_rounds))
{
(void) round;
(void)round;
osrm_uint32 sum{0};
osrm_uint32 mult{1};
for (auto idx : indices)
Expand All @@ -69,7 +69,7 @@ int main(int, char **)
TIMER_START(plain_u32);
for (auto round : util::irange(0, num_rounds))
{
(void) round;
(void)round;
std::uint32_t sum{0};
std::uint32_t mult{1};
for (auto idx : indices)
Expand All @@ -88,7 +88,7 @@ int main(int, char **)
TIMER_START(aliased_double);
for (auto round : util::irange(0, num_rounds))
{
(void) round;
(void)round;
osrm_double sum{0.0};
osrm_double mult{1.0};
for (auto idx : indices)
Expand All @@ -108,7 +108,7 @@ int main(int, char **)
TIMER_START(plain_double);
for (auto round : util::irange(0, num_rounds))
{
(void) round;
(void)round;
double sum{0.0};
double mult{1.0};
for (auto idx : indices)
Expand Down
24 changes: 12 additions & 12 deletions src/extractor/compressed_edge_container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,16 @@ SegmentDuration CompressedEdgeContainer::ClipDuration(const SegmentDuration dura
// ----------> via_node_id -----------> target_node_id
// weight_1 weight_2
// duration_1 duration_2
void CompressedEdgeContainer::CompressEdge(
const EdgeID edge_id_1,
const EdgeID edge_id_2,
const NodeID via_node_id,
const NodeID target_node_id,
const EdgeWeight weight1,
const EdgeWeight weight2,
const EdgeDuration duration1,
const EdgeDuration duration2,
const EdgeWeight node_weight_penalty,
const EdgeDuration node_duration_penalty)
void CompressedEdgeContainer::CompressEdge(const EdgeID edge_id_1,
const EdgeID edge_id_2,
const NodeID via_node_id,
const NodeID target_node_id,
const EdgeWeight weight1,
const EdgeWeight weight2,
const EdgeDuration duration1,
const EdgeDuration duration2,
const EdgeWeight node_weight_penalty,
const EdgeDuration node_duration_penalty)
{
// remove super-trivial geometries
BOOST_ASSERT(SPECIAL_EDGEID != edge_id_1);
Expand Down Expand Up @@ -169,7 +168,8 @@ void CompressedEdgeContainer::CompressEdge(

// if the via-node offers a penalty, we add the weight of the penalty as an artificial
// segment that references SPECIAL_NODEID
if (node_weight_penalty != INVALID_EDGE_WEIGHT && node_duration_penalty != MAXIMAL_EDGE_DURATION)
if (node_weight_penalty != INVALID_EDGE_WEIGHT &&
node_duration_penalty != MAXIMAL_EDGE_DURATION)
{
edge_bucket_list1.emplace_back(OnewayCompressedEdge{
via_node_id, ClipWeight(node_weight_penalty), ClipDuration(node_duration_penalty)});
Expand Down
3 changes: 2 additions & 1 deletion src/extractor/graph_compressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ void GraphCompressor::Compress(
graph.GetEdgeData(forward_e1).duration += forward_duration2;
graph.GetEdgeData(reverse_e1).duration += reverse_duration2;

if (node_weight_penalty != INVALID_EDGE_WEIGHT && node_duration_penalty != MAXIMAL_EDGE_DURATION)
if (node_weight_penalty != INVALID_EDGE_WEIGHT &&
node_duration_penalty != MAXIMAL_EDGE_DURATION)
{
graph.GetEdgeData(forward_e1).weight += node_weight_penalty;
graph.GetEdgeData(reverse_e1).weight += node_weight_penalty;
Expand Down
3 changes: 2 additions & 1 deletion unit_tests/util/static_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ template <unsigned NUM_NODES, unsigned NUM_EDGES> struct RandomArrayEntryFixture
std::uniform_int_distribution<> node_udist(0, NUM_NODES - 1);
for (unsigned i = 0; i < NUM_EDGES; i++)
{
edges.emplace_back(TestEdgeArrayEntry{static_cast<unsigned>(node_udist(g)), {EdgeID{i}}});
edges.emplace_back(
TestEdgeArrayEntry{static_cast<unsigned>(node_udist(g)), {EdgeID{i}}});
}

for (unsigned i = 0; i < NUM_NODES; i++)
Expand Down

0 comments on commit ac6920e

Please sign in to comment.