Perfomance fixes
This commit is contained in:
@@ -78,7 +78,7 @@ inline NodeID readOSMRGraphFromStream(istream &in, vector<EdgeT>& edgeList, vect
|
||||
|
||||
// translate the external NodeIDs to internal IDs
|
||||
ExternalNodeMap::iterator intNodeID = ext2IntNodeMap.find(source);
|
||||
if( intNodeID == ext2IntNodeMap.end())
|
||||
if( ext2IntNodeMap.find(source) == ext2IntNodeMap.end())
|
||||
{
|
||||
cerr << "after " << edgeList.size() << " edges" << endl;
|
||||
cerr << "->" << source << "," << target << "," << length << "," << dir << "," << weight << endl;
|
||||
@@ -86,7 +86,7 @@ inline NodeID readOSMRGraphFromStream(istream &in, vector<EdgeT>& edgeList, vect
|
||||
}
|
||||
source = intNodeID->second;
|
||||
intNodeID = ext2IntNodeMap.find(target);
|
||||
if(intNodeID == ext2IntNodeMap.end()) { cerr << "unresolved target NodeID : " << target << endl; exit(0); }
|
||||
if(ext2IntNodeMap.find(target) == ext2IntNodeMap.end()) { cerr << "unresolved target NodeID : " << target << endl; exit(0); }
|
||||
target = intNodeID->second;
|
||||
|
||||
if(source == UINT_MAX || target == UINT_MAX) { cerr << "nonexisting source or target" << endl; exit(0); }
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
SearchEngine(GraphT * g, NodeHelperT * nh) : _graph(g), nodeHelpDesk(nh) {}
|
||||
~SearchEngine() {}
|
||||
|
||||
const void getNodeInfo(NodeID id, _Coordinate& result) const
|
||||
inline const void getNodeInfo(NodeID id, _Coordinate& result) const
|
||||
{
|
||||
result.lat = nodeHelpDesk->getLatitudeOfNode(id);
|
||||
result.lon = nodeHelpDesk->getLongitudeOfNode(id);
|
||||
|
||||
Reference in New Issue
Block a user