diff --git a/Algorithms/PolylineCompressor.h b/Algorithms/PolylineCompressor.h index a05c4a3d1..836fdb868 100644 --- a/Algorithms/PolylineCompressor.h +++ b/Algorithms/PolylineCompressor.h @@ -29,7 +29,7 @@ or see http://www.gnu.org/licenses/agpl.txt. class PolylineCompressor { private: - inline void encodeVectorSignedNumber(vector & numbers, string & output) { + inline void encodeVectorSignedNumber(std::vector & numbers, std::string & output) { for(unsigned i = 0; i < numbers.size(); ++i) { numbers[i] <<= 1; if (numbers[i] < 0) { @@ -41,7 +41,7 @@ private: } } - inline void encodeNumber(int numberToEncode, string & output) { + inline void encodeNumber(int numberToEncode, std::string & output) { while (numberToEncode >= 0x20) { int nextValue = (0x20 | (numberToEncode & 0x1f)) + 63; output += (static_cast (nextValue)); @@ -57,8 +57,8 @@ private: } public: - inline void printEncodedString(const vector& polyline, string &output) { - vector deltaNumbers; + inline void printEncodedString(const std::vector& polyline, std::string &output) { + std::vector deltaNumbers; output += "\""; if(!polyline.empty()) { _Coordinate lastCoordinate = polyline[0].location; @@ -77,8 +77,8 @@ public: } - inline void printEncodedString(const vector<_Coordinate>& polyline, string &output) { - vector deltaNumbers(2*polyline.size()); + inline void printEncodedString(const std::vector<_Coordinate>& polyline, std::string &output) { + std::vector deltaNumbers(2*polyline.size()); output += "\""; if(!polyline.empty()) { deltaNumbers[0] = polyline[0].lat; @@ -92,9 +92,9 @@ public: output += "\""; } - inline void printUnencodedString(vector<_Coordinate> & polyline, string & output) { + inline void printUnencodedString(std::vector<_Coordinate> & polyline, std::string & output) { output += "["; - string tmp; + std::string tmp; for(unsigned i = 0; i < polyline.size(); i++) { convertInternalLatLonToString(polyline[i].lat, tmp); output += "["; @@ -110,9 +110,9 @@ public: output += "]"; } - inline void printUnencodedString(vector & polyline, string & output) { + inline void printUnencodedString(std::vector & polyline, std::string & output) { output += "["; - string tmp; + std::string tmp; for(unsigned i = 0; i < polyline.size(); i++) { if(!polyline[i].necessary) continue; diff --git a/DataStructures/ExtractorStructs.h b/DataStructures/ExtractorStructs.h index ad0b1f411..dc4488be0 100644 --- a/DataStructures/ExtractorStructs.h +++ b/DataStructures/ExtractorStructs.h @@ -46,7 +46,7 @@ struct _Node : NodeInfo{ return _Node(0,0,0, false, false); } static _Node max_value() { - return _Node((numeric_limits::max)(), (numeric_limits::max)(), (numeric_limits::max)(), false, false); + return _Node((std::numeric_limits::max)(), (std::numeric_limits::max)(), (std::numeric_limits::max)(), false, false); } NodeID key() const { return id; diff --git a/DataStructures/NNGrid.h b/DataStructures/NNGrid.h index 4eae38452..a7bdca071 100644 --- a/DataStructures/NNGrid.h +++ b/DataStructures/NNGrid.h @@ -241,7 +241,7 @@ public: } } _Coordinate tmp; - double dist = (numeric_limits::max)(); + double dist = (std::numeric_limits::max)(); BOOST_FOREACH(_GridEdge candidate, candidates) { double r = 0.; double tmpDist = ComputeDistance(inputCoordinate, candidate.startCoord, candidate.targetCoord, tmp, &r); @@ -265,7 +265,7 @@ public: } } _Coordinate tmp; - double dist = (numeric_limits::max)(); + double dist = (std::numeric_limits::max)(); BOOST_FOREACH(_GridEdge candidate, candidates) { double r = 0.; double tmpDist = ComputeDistance(startCoord, candidate.startCoord, candidate.targetCoord, tmp, &r); @@ -300,12 +300,12 @@ private: } unsigned FillCell(std::vector& entriesWithSameRAMIndex, const unsigned long fileOffset ) { - vector tmpBuffer(32*32*4096,0); + std::vector tmpBuffer(32*32*4096,0); unsigned long indexIntoTmpBuffer = 0; unsigned numberOfWrittenBytes = 0; assert(indexOutFile.is_open()); - vector cellIndex(32*32,ULONG_MAX); + std::vector cellIndex(32*32,ULONG_MAX); boost::unordered_map< unsigned, unsigned, IdenticalHashFunction > cellMap(1024); unsigned ramIndex = entriesWithSameRAMIndex.begin()->ramIndex; @@ -355,7 +355,7 @@ private: return numberOfWrittenBytes; } - unsigned FlushEntriesWithSameFileIndexToBuffer( std::vector &vectorWithSameFileIndex, vector & tmpBuffer, const unsigned long index) { + unsigned FlushEntriesWithSameFileIndexToBuffer( std::vector &vectorWithSameFileIndex, std::vector & tmpBuffer, const unsigned long index) { tmpBuffer.resize(tmpBuffer.size()+(sizeof(_GridEdge)*vectorWithSameFileIndex.size()) + sizeof(unsigned) ); unsigned counter = 0; @@ -524,8 +524,8 @@ private: const static unsigned long END_OF_BUCKET_DELIMITER = UINT_MAX; - ofstream indexOutFile; - ifstream ramInFile; + std::ofstream indexOutFile; + std::ifstream ramInFile; #ifndef ROUTED stxxl::vector entries; #endif diff --git a/DataStructures/NodeCoords.h b/DataStructures/NodeCoords.h index d695c34a7..7f1d964b3 100644 --- a/DataStructures/NodeCoords.h +++ b/DataStructures/NodeCoords.h @@ -39,10 +39,10 @@ struct NodeCoords { NodeT id; static NodeCoords min_value() { - return NodeCoords(-90*100000,-180*100000,numeric_limits::min()); + return NodeCoords(-90*100000,-180*100000,std::numeric_limits::min()); } static NodeCoords max_value() { - return NodeCoords(90*100000, 180*100000, numeric_limits::max()); + return NodeCoords(90*100000, 180*100000, std::numeric_limits::max()); } value_type operator[](std::size_t n) const { diff --git a/Util/GraphLoader.h b/Util/GraphLoader.h index 1bc37a7f6..74cb0975d 100644 --- a/Util/GraphLoader.h +++ b/Util/GraphLoader.h @@ -56,7 +56,7 @@ NodeID readBinaryOSRMGraphFromStream(std::istream &in, std::vector& edgeL for (NodeID i=0; ipush_back(NodeInfo(node.lat, node.lon, node.id)); - ext2IntNodeMap.insert(make_pair(node.id, i)); + ext2IntNodeMap.insert(std::make_pair(node.id, i)); if(node.bollard) bollardNodes.push_back(i); if(node.trafficLight) @@ -162,7 +162,7 @@ NodeID readBinaryOSRMGraphFromStream(std::istream &in, std::vector& edgeL return n; } template -NodeID readDTMPGraphFromStream(istream &in, vector& edgeList, vector * int2ExtNodeMap) { +NodeID readDTMPGraphFromStream(std::istream &in, std::vector& edgeList, std::vector * int2ExtNodeMap) { NodeID n, source, target, id; EdgeID m; int dir, xcoord, ycoord;// direction (0 = open, 1 = forward, 2+ = open) @@ -172,7 +172,7 @@ NodeID readDTMPGraphFromStream(istream &in, vector& edgeList, vector> id >> ycoord >> xcoord; int2ExtNodeMap->push_back(NodeInfo(xcoord, ycoord, id)); - ext2IntNodeMap.insert(make_pair(id, i)); + ext2IntNodeMap.insert(std::make_pair(id, i)); } in >> m; DEBUG(" and " << m << " edges"); @@ -269,13 +269,13 @@ NodeID readDTMPGraphFromStream(istream &in, vector& edgeList, vector(edgeList.begin(), edgeList.end()).swap(edgeList); //remove excess candidates. - cout << "ok" << endl; + std::vector(edgeList.begin(), edgeList.end()).swap(edgeList); //remove excess candidates. + std::cout << "ok" << std::endl; return n; } template -NodeID readDDSGGraphFromStream(istream &in, vector& edgeList, vector & int2ExtNodeMap) { +NodeID readDDSGGraphFromStream(std::istream &in, std::vector& edgeList, std::vector & int2ExtNodeMap) { ExternalNodeMap nodeMap; NodeID n, source, target; unsigned numberOfNodes = 0; @@ -319,14 +319,14 @@ NodeID readDDSGGraphFromStream(istream &in, vector& edgeList, vector(edgeList.begin(), edgeList.end()).swap(edgeList); //remove excess candidates. + std::vector(edgeList.begin(), edgeList.end()).swap(edgeList); //remove excess candidates. nodeMap.clear(); return numberOfNodes; } template -unsigned readHSGRFromStream(istream &in, vector& nodeList, vector & edgeList, unsigned * checkSum) { +unsigned readHSGRFromStream(std::istream &in, std::vector& nodeList, std::vector & edgeList, unsigned * checkSum) { unsigned numberOfNodes = 0; in.read((char*) checkSum, sizeof(unsigned)); in.read((char*) & numberOfNodes, sizeof(unsigned)); diff --git a/Util/NASAGridSquare.cpp b/Util/NASAGridSquare.cpp index 49a5169e2..112ed0b70 100644 --- a/Util/NASAGridSquare.cpp +++ b/Util/NASAGridSquare.cpp @@ -29,13 +29,13 @@ std::string NasaGridSquare::make_filename(const char* ext) const { char EW =(longitude>=0 ? 'E' : 'W' ); char NS =(latitude >=0 ? 'N' : 'S'); std::stringstream ss; - ss<