Fixes cucumber test features/bad.feature:15

This commit is contained in:
DennisOSRM
2012-09-27 14:55:48 +02:00
parent bd6f2db1d1
commit c16c2adeda
3 changed files with 13 additions and 2 deletions
+3 -1
View File
@@ -42,7 +42,9 @@ struct _Coordinate {
}
return true;
}
bool operator==(const _Coordinate & other) const {
return lat == other.lat && lon == other.lon;
}
};
inline std::ostream & operator<<(std::ostream & out, const _Coordinate & c){
+8
View File
@@ -45,6 +45,10 @@ struct PhantomNode {
bool isValid(const unsigned numberOfNodes) const {
return location.isValid() && (edgeBasedNode < numberOfNodes) && (weight1 != INT_MAX) && (ratio >= 0.) && (ratio <= 1.) && (nodeBasedEdgeNameID != UINT_MAX);
}
bool operator==(const PhantomNode & other) const {
return location == other.location;
}
};
struct PhantomNodes {
@@ -62,6 +66,10 @@ struct PhantomNodes {
bool AtLeastOnePhantomNodeIsUINTMAX() const {
return !(startPhantom.edgeBasedNode == UINT_MAX || targetPhantom.edgeBasedNode == UINT_MAX);
}
bool PhantomNodesHaveEqualLocation() const {
return startPhantom == targetPhantom;
}
};
inline std::ostream& operator<<(std::ostream &out, const PhantomNodes & pn){