Be kind to the optimizer, pass coordinates by value (just two ints)

This commit is contained in:
Daniel J. Hofmann
2016-01-21 13:07:24 +01:00
committed by Patrick Niklaus
parent 46fc6f8da4
commit d391df52ba
17 changed files with 165 additions and 162 deletions
+2 -2
View File
@@ -58,8 +58,8 @@ struct EdgeBasedNode
(reverse_edge_based_node_id != SPECIAL_NODEID));
}
static inline util::FixedPointCoordinate Centroid(const util::FixedPointCoordinate &a,
const util::FixedPointCoordinate &b)
static inline util::FixedPointCoordinate Centroid(const util::FixedPointCoordinate a,
const util::FixedPointCoordinate b)
{
util::FixedPointCoordinate centroid;
// The coordinates of the midpoint are given by: