Making find() return a const_iterator ensures that the function is const

and does not allocate any unnecessary RAM.
This commit is contained in:
DennisOSRM 2011-10-04 15:07:25 +02:00
parent 482edd0b02
commit 7dc17ae693

View File

@ -183,7 +183,7 @@ public:
}
if ( w.useful && w.access && w.path.size() > 1 ) {
StringMap::iterator strit = stringMap->find(w.name);
StringMap::const_iterator strit = stringMap->find(w.name);
if(strit == stringMap->end()) {
w.nameID = externalMemory->nameVector.size();
externalMemory->nameVector.push_back(w.name);