Removing last remaining 'using namespace std' statement

This commit is contained in:
DennisOSRM
2012-12-29 21:02:26 +01:00
parent 943c15927a
commit 8fc8a4e303
8 changed files with 21 additions and 29 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ bool ExtractorCallbacks::wayFunction(_Way &w) {
std::reverse( w.path.begin(), w.path.end() );
}
for(vector< NodeID >::size_type n = 0; n < w.path.size()-1; ++n) {
for(std::vector< NodeID >::size_type n = 0; n < w.path.size()-1; ++n) {
externalMemory->allEdges.push_back(_Edge(w.path[n], w.path[n+1], w.type, w.direction, w.speed, w.nameID, w.roundabout, w.ignoreInGrid, w.isDurationSet, w.isAccessRestricted));
externalMemory->usedNodeIDs.push_back(w.path[n]);
}
+5 -5
View File
@@ -110,7 +110,7 @@ struct _Edge {
return _Edge(0,0);
}
static _Edge max_value() {
return _Edge((numeric_limits<unsigned>::max)(), (numeric_limits<unsigned>::max)());
return _Edge((std::numeric_limits<unsigned>::max)(), (std::numeric_limits<unsigned>::max)());
}
};
@@ -125,10 +125,10 @@ struct _WayIDStartAndEndEdge {
_WayIDStartAndEndEdge(unsigned w, NodeID fs, NodeID ft, NodeID ls, NodeID lt) : wayID(w), firstStart(fs), firstTarget(ft), lastStart(ls), lastTarget(lt) {}
static _WayIDStartAndEndEdge min_value() {
return _WayIDStartAndEndEdge((numeric_limits<unsigned>::min)(), (numeric_limits<unsigned>::min)(), (numeric_limits<unsigned>::min)(), (numeric_limits<unsigned>::min)(), (numeric_limits<unsigned>::min)());
return _WayIDStartAndEndEdge((std::numeric_limits<unsigned>::min)(), (std::numeric_limits<unsigned>::min)(), (std::numeric_limits<unsigned>::min)(), (std::numeric_limits<unsigned>::min)(), (std::numeric_limits<unsigned>::min)());
}
static _WayIDStartAndEndEdge max_value() {
return _WayIDStartAndEndEdge((numeric_limits<unsigned>::max)(), (numeric_limits<unsigned>::max)(), (numeric_limits<unsigned>::max)(), (numeric_limits<unsigned>::max)(), (numeric_limits<unsigned>::max)());
return _WayIDStartAndEndEdge((std::numeric_limits<unsigned>::max)(), (std::numeric_limits<unsigned>::max)(), (std::numeric_limits<unsigned>::max)(), (std::numeric_limits<unsigned>::max)(), (std::numeric_limits<unsigned>::max)());
}
};
@@ -202,7 +202,7 @@ struct CmpEdgeByTargetID : public std::binary_function<_Edge, _Edge, bool>
}
};
inline string GetRandomString() {
inline std::string GetRandomString() {
char s[128];
static const char alphanum[] =
"0123456789"
@@ -213,7 +213,7 @@ inline string GetRandomString() {
s[i] = alphanum[rand() % (sizeof(alphanum) - 1)];
}
s[127] = 0;
return string(s);
return std::string(s);
}
#endif /* EXTRACTORSTRUCTS_H_ */
+2 -3
View File
@@ -75,7 +75,7 @@ public:
if(!externalMemory->nodeFunction(n))
std::cerr << "[XMLParser] dense node not parsed" << std::endl;
} catch (const luabind::error &er) {
cerr << er.what() << endl;
std::cerr << er.what() << std::endl;
lua_State* Ler=er.state();
report_errors(Ler, -1);
} catch (std::exception & e) {
@@ -86,7 +86,6 @@ public:
}
if ( xmlStrEqual( currentName, ( const xmlChar* ) "way" ) == 1 ) {
string name;
_Way way = _ReadXMLWay( );
/** Pass the unpacked way to the LUA call back **/
@@ -101,7 +100,7 @@ public:
std::cerr << "[PBFParser] way not parsed" << std::endl;
}
} catch (const luabind::error &er) {
cerr << er.what() << endl;
std::cerr << er.what() << std::endl;
lua_State* Ler=er.state();
report_errors(Ler, -1);
} catch (std::exception & e) {