Escape string in json renderer

This commit is contained in:
Patrick Niklaus
2015-02-25 21:10:09 +01:00
parent fdf2e5934d
commit 440eda3807
2 changed files with 42 additions and 10 deletions
-8
View File
@@ -56,19 +56,11 @@ std::string PolylineCompressor::encode_number(int number_to_encode) const
{
const int next_value = (0x20 | (number_to_encode & 0x1f)) + 63;
output += static_cast<char>(next_value);
if (92 == next_value)
{
output += static_cast<char>(next_value);
}
number_to_encode >>= 5;
}
number_to_encode += 63;
output += static_cast<char>(number_to_encode);
if (92 == number_to_encode)
{
output += static_cast<char>(number_to_encode);
}
return output;
}