Skip to content

Commit 286d025

Browse files
Remove std::ostringstream from TileKey::ToHereTile (#1351)
Not the most efficient way of converting number to string. Replace with dedicated std::to_string. `ToHereTile` is being used a lot in the logs so any performance gains are welcomed. Relates-To: OAM-1686 Signed-off-by: Andrey Kashcheev <[email protected]>
1 parent 4c0a194 commit 286d025

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

olp-cpp-sdk-core/src/geo/tiling/TileKey.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ TileKey TileKey::FromQuadKey(const std::string& quad_key) {
7676
}
7777

7878
std::string TileKey::ToHereTile() const {
79-
std::ostringstream os;
80-
os << std::dec << ToQuadKey64();
81-
return os.str();
79+
return std::to_string(ToQuadKey64());
8280
}
8381

8482
TileKey TileKey::FromHereTile(const std::string& key) {

0 commit comments

Comments
 (0)