Merge ce4112a211
into 435efc9886
This commit is contained in:
commit
aa4eb3504a
@ -264,8 +264,8 @@ private:
|
||||
data->_heapForward->Insert( source, 0, source );
|
||||
data->_heapBackward->Insert( target, 0, target );
|
||||
|
||||
int targetDistance = std::numeric_limits< int >::max();
|
||||
NodeID middle = std::numeric_limits<NodeID>::max();
|
||||
int targetDistance = (std::numeric_limits< int >::max)();
|
||||
NodeID middle = (std::numeric_limits<NodeID>::max)();
|
||||
|
||||
while ( data->_heapForward->Size() + data->_heapBackward->Size() > 0 ) {
|
||||
if ( data->_heapForward->Size() > 0 ) {
|
||||
|
@ -157,7 +157,7 @@ public:
|
||||
forwardEdge.data.shortcut = backwardEdge.data.shortcut = false;
|
||||
forwardEdge.data.via = backwardEdge.data.via = via;
|
||||
forwardEdge.data.originalEdges = backwardEdge.data.originalEdges = 1;
|
||||
forwardEdge.data.distance = backwardEdge.data.distance = std::numeric_limits< int >::max();
|
||||
forwardEdge.data.distance = backwardEdge.data.distance = (std::numeric_limits< int >::max)();
|
||||
//remove parallel edges
|
||||
while ( i < edges.size() && edges[i].source == source && edges[i].target == target ) {
|
||||
if ( edges[i].data.forward )
|
||||
@ -397,7 +397,7 @@ private:
|
||||
continue;
|
||||
const NodeID target = _graph->GetTarget( outEdge );
|
||||
const int pathDistance = inData.distance + outData.distance;
|
||||
maxDistance = std::max( maxDistance, pathDistance );
|
||||
maxDistance = (std::max)( maxDistance, pathDistance );
|
||||
if ( !heap.WasInserted( target ) ) {
|
||||
heap.Insert( target, pathDistance, _HeapData( true ) );
|
||||
numTargets++;
|
||||
|
@ -141,7 +141,7 @@ public:
|
||||
void Clear() {
|
||||
heap.resize( 1 );
|
||||
insertedNodes.clear();
|
||||
heap[0].weight = std::numeric_limits< Weight >::min();
|
||||
heap[0].weight = (std::numeric_limits< Weight >::min)();
|
||||
nodeIndex.Clear();
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ public:
|
||||
|
||||
if(0 < settings[highway]) {
|
||||
if(0 < maxspeed)
|
||||
w.speed = std::min(maxspeed, settings[highway]);
|
||||
w.speed = (std::min)(maxspeed, settings[highway]);
|
||||
else
|
||||
w.speed = settings[highway];
|
||||
} else {
|
||||
|
@ -271,7 +271,7 @@ public:
|
||||
}
|
||||
}
|
||||
_Coordinate tmp;
|
||||
double dist = numeric_limits<double>::max();
|
||||
double dist = (numeric_limits<double>::max)();
|
||||
BOOST_FOREACH(_GridEdge candidate, candidates) {
|
||||
double r = 0.;
|
||||
double tmpDist = ComputeDistance(startCoord, candidate.startCoord, candidate.targetCoord, tmp, &r);
|
||||
@ -304,7 +304,7 @@ public:
|
||||
|
||||
_GridEdge smallestEdge;
|
||||
_Coordinate tmp, newEndpoint;
|
||||
double dist = numeric_limits<double>::max();
|
||||
double dist = (numeric_limits<double>::max)();
|
||||
BOOST_FOREACH(_GridEdge candidate, candidates) {
|
||||
double r = 0.;
|
||||
double tmpDist = ComputeDistance(startCoord, candidate.startCoord, candidate.targetCoord, tmp, &r);
|
||||
@ -338,7 +338,7 @@ public:
|
||||
// INFO("-> node: " << resultNode.edgeBasedNode << ", bidir: " << (resultNode.isBidirected() ? "yes" : "no"));
|
||||
// }
|
||||
|
||||
double ratio = std::min(1., LengthOfVector(smallestEdge.startCoord, newEndpoint)/LengthOfVector(smallestEdge.startCoord, smallestEdge.targetCoord) );
|
||||
double ratio = (std::min)(1., LengthOfVector(smallestEdge.startCoord, newEndpoint)/LengthOfVector(smallestEdge.startCoord, smallestEdge.targetCoord) );
|
||||
assert(ratio >= 0 && ratio <=1);
|
||||
// INFO("Old weight1: " << resultNode.weight1 << ", old weight2: " << resultNode.weight2);
|
||||
resultNode.weight1 *= ratio;
|
||||
|
Loading…
Reference in New Issue
Block a user