Fixing errors from static analysis

This commit is contained in:
Dennis Luxen
2013-06-27 11:44:32 -04:00
parent 1bcacfab74
commit 5c84c12f40
4 changed files with 98 additions and 78 deletions
+1 -1
View File
@@ -474,7 +474,7 @@ public:
newEdge.data.id = data.id;
}
BOOST_ASSERT_MSG(
newEdge.data.id <= INT_MAX, //2^31
newEdge.data.id != INT_MAX, //2^31
"edge id invalid"
);
newEdge.data.forward = data.forward;
+11
View File
@@ -56,6 +56,17 @@
class EdgeBasedGraphFactory : boost::noncopyable {
public:
struct EdgeBasedNode {
EdgeBasedNode() :
id(INT_MAX),
lat1(INT_MAX),
lat2(INT_MAX),
lon1(INT_MAX),
lon2(INT_MAX >> 1),
belongsToTinyComponent(false),
nameID(UINT_MAX),
weight(UINT_MAX >> 1),
ignoreInGrid(false)
{ }
bool operator<(const EdgeBasedNode & other) const {
return other.id < id;
}