diff --git a/Contractor/ContractionCleanup.h b/Contractor/ContractionCleanup.h index e2b75e1ae..2b32e18aa 100644 --- a/Contractor/ContractionCleanup.h +++ b/Contractor/ContractionCleanup.h @@ -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::max(); + int targetDistance = (std::numeric_limits< int >::max)(); + NodeID middle = (std::numeric_limits::max)(); while ( data->_heapForward->Size() + data->_heapBackward->Size() > 0 ) { if ( data->_heapForward->Size() > 0 ) { diff --git a/Contractor/Contractor.h b/Contractor/Contractor.h index c8d9568e8..55c87453a 100644 --- a/Contractor/Contractor.h +++ b/Contractor/Contractor.h @@ -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++; diff --git a/DataStructures/BinaryHeap.h b/DataStructures/BinaryHeap.h index 00304f23a..f48e571a0 100644 --- a/DataStructures/BinaryHeap.h +++ b/DataStructures/BinaryHeap.h @@ -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(); } diff --git a/DataStructures/ExtractorCallBacks.h b/DataStructures/ExtractorCallBacks.h index d84a5ebfc..5440c45bc 100644 --- a/DataStructures/ExtractorCallBacks.h +++ b/DataStructures/ExtractorCallBacks.h @@ -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 { diff --git a/DataStructures/NNGrid.h b/DataStructures/NNGrid.h index 04169cf6a..1b622c20c 100644 --- a/DataStructures/NNGrid.h +++ b/DataStructures/NNGrid.h @@ -271,7 +271,7 @@ public: } } _Coordinate tmp; - double dist = numeric_limits::max(); + double dist = (numeric_limits::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::max(); + double dist = (numeric_limits::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;