Merge branch 'master' of https://github.com/DennisOSRM/Project-OSRM
This commit is contained in:
commit
653fe572cb
@ -173,8 +173,14 @@ public:
|
|||||||
w.nameID = strit->second;
|
w.nameID = strit->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
GUARANTEE(w.id != UINT_MAX, "found way with unknown type");
|
if(-1 == w.speed){
|
||||||
GUARANTEE(-1 != w.speed, "found way with unknown speed");
|
WARN("found way with bogus speed, id: " << w.id);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(w.id == UINT_MAX) {
|
||||||
|
WARN("found way with unknown type" << w.id);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if ( w.direction == _Way::opposite ){
|
if ( w.direction == _Way::opposite ){
|
||||||
std::reverse( w.path.begin(), w.path.end() );
|
std::reverse( w.path.begin(), w.path.end() );
|
||||||
|
@ -310,10 +310,6 @@ public:
|
|||||||
double tmpDist = ComputeDistance(startCoord, candidate.startCoord, candidate.targetCoord, tmp, &r);
|
double tmpDist = ComputeDistance(startCoord, candidate.startCoord, candidate.targetCoord, tmp, &r);
|
||||||
if(DoubleEpsilonCompare(dist, tmpDist) && 1 == std::abs((int)candidate.edgeBasedNode-(int)resultNode.edgeBasedNode)) {
|
if(DoubleEpsilonCompare(dist, tmpDist) && 1 == std::abs((int)candidate.edgeBasedNode-(int)resultNode.edgeBasedNode)) {
|
||||||
resultNode.weight2 = candidate.weight;
|
resultNode.weight2 = candidate.weight;
|
||||||
/* if(resultNode.weight1 != resultNode.weight2) {
|
|
||||||
ERR("w1: " << resultNode.weight1 << ", w2: " << resultNode.weight2);
|
|
||||||
assert(false);
|
|
||||||
}*/
|
|
||||||
if(candidate.edgeBasedNode < resultNode.edgeBasedNode) {
|
if(candidate.edgeBasedNode < resultNode.edgeBasedNode) {
|
||||||
resultNode.edgeBasedNode = candidate.edgeBasedNode;
|
resultNode.edgeBasedNode = candidate.edgeBasedNode;
|
||||||
std::swap(resultNode.weight1, resultNode.weight2);
|
std::swap(resultNode.weight1, resultNode.weight2);
|
||||||
@ -412,7 +408,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline bool DoubleEpsilonCompare(const double d1, const double d2) {
|
inline bool DoubleEpsilonCompare(const double d1, const double d2) {
|
||||||
return (std::fabs(d1 - d2) < 0.000000001);
|
return (std::fabs(d1 - d2) < 0.0001);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned FillCell(std::vector<GridEntry>& entriesWithSameRAMIndex, unsigned fileOffset ) {
|
unsigned FillCell(std::vector<GridEntry>& entriesWithSameRAMIndex, unsigned fileOffset ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user