diff --git a/DataStructures/PolylineCompressor.h b/DataStructures/PolylineCompressor.h index 58fe386c3..92e5d8143 100644 --- a/DataStructures/PolylineCompressor.h +++ b/DataStructures/PolylineCompressor.h @@ -21,6 +21,8 @@ or see http://www.gnu.org/licenses/agpl.txt. #ifndef POLYLINECOMPRESSOR_H_ #define POLYLINECOMPRESSOR_H_ +#include + #include "ExtractorStructs.h" class PolylineCompressor { @@ -34,18 +36,18 @@ private: } inline string encodeNumber(int numberToEncode) const { - ostringstream encodeString; + string encodeString; while (numberToEncode >= 0x20) { int nextValue = (0x20 | (numberToEncode & 0x1f)) + 63; - encodeString << (static_cast (nextValue)); + encodeString += (static_cast (nextValue)); numberToEncode >>= 5; } numberToEncode += 63; - encodeString << (static_cast (numberToEncode)); + encodeString += (static_cast (numberToEncode)); - return encodeString.str(); + return encodeString; } inline void replaceBackslash(string & str) {