Perfomance fixes

This commit is contained in:
Dennis Luxen
2010-09-02 13:01:49 +00:00
parent cc44fef25d
commit e79e36bea9
9 changed files with 105 additions and 48 deletions
+2 -2
View File
@@ -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); }
+1 -1
View File
@@ -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);