made geometry_string a const reference

This commit is contained in:
Andreas Gruß 2015-06-02 13:06:06 +02:00
parent 79d2083a00
commit 4d73f98050
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ PolylineCompressor::get_encoded_string(const std::vector<SegmentInformation> &po
return encode_vector(delta_numbers); return encode_vector(delta_numbers);
} }
std::vector<FixedPointCoordinate> PolylineCompressor::decode_string(const std::string geometry_string) const std::vector<FixedPointCoordinate> PolylineCompressor::decode_string(const std::string &geometry_string) const
{ {
std::vector<FixedPointCoordinate> new_coordinates; std::vector<FixedPointCoordinate> new_coordinates;
int index = 0, len = geometry_string.size(); int index = 0, len = geometry_string.size();

View File

@ -45,7 +45,7 @@ class PolylineCompressor
public: public:
std::string get_encoded_string(const std::vector<SegmentInformation> &polyline) const; std::string get_encoded_string(const std::vector<SegmentInformation> &polyline) const;
std::vector<FixedPointCoordinate> decode_string(const std::string geometry_string) const; std::vector<FixedPointCoordinate> decode_string(const std::string &geometry_string) const;
}; };
#endif /* POLYLINECOMPRESSOR_H_ */ #endif /* POLYLINECOMPRESSOR_H_ */