Fixing errors from static analysis
This commit is contained in:
parent
1bcacfab74
commit
5c84c12f40
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -41,7 +41,12 @@ private:
|
||||
DescriptionFactory alternateDescriptionFactory;
|
||||
_Coordinate current;
|
||||
unsigned numberOfEnteredRestrictedAreas;
|
||||
struct {
|
||||
struct RoundAbout{
|
||||
RoundAbout() :
|
||||
startIndex(INT_MAX),
|
||||
nameID(INT_MAX),
|
||||
leaveAtExit(INT_MAX)
|
||||
{}
|
||||
int startIndex;
|
||||
int nameID;
|
||||
int leaveAtExit;
|
||||
|
@ -39,6 +39,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
||||
ExtractorCallbacks * extractCallBacks;
|
||||
|
||||
int main (int argc, char *argv[]) {
|
||||
try {
|
||||
double startup_time = get_timestamp();
|
||||
|
||||
if(argc < 2) {
|
||||
@ -123,4 +124,7 @@ int main (int argc, char *argv[]) {
|
||||
<< "./osrm-prepare " << output_file_name << " " << restrictionsFileName
|
||||
<< std::endl;
|
||||
return 0;
|
||||
} catch(std::exception & e) {
|
||||
WARN("unhandled exception: " << e.what());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user