From 292d917dfead339705eb1efd0c2e2e4c1b86d76a Mon Sep 17 00:00:00 2001 From: tatiana-yan Date: Mon, 22 Jul 2019 19:01:44 +0300 Subject: [PATCH] [search][Alohalytics] Add coords to search result. --- search/result.cpp | 4 ++++ search/result.hpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/search/result.cpp b/search/result.cpp index f7a0123af5..e8042d9269 100644 --- a/search/result.cpp +++ b/search/result.cpp @@ -140,6 +140,10 @@ string Result::ToStringForStats() const s.append(readableType); s.append("|"); s.append(IsSuggest() ? "1" : "0"); + s.append("|"); + s.append(to_string(MercatorBounds::YToLat(m_center.y))); + s.append("|"); + s.append(to_string(MercatorBounds::XToLon(m_center.x))); return s; } diff --git a/search/result.hpp b/search/result.hpp index 598a0241bf..70e7ccde57 100644 --- a/search/result.hpp +++ b/search/result.hpp @@ -236,7 +236,7 @@ public: template void SortBy(Fn && comparator) { - sort(begin(), end(), std::forward(comparator)); + std::sort(begin(), end(), std::forward(comparator)); for (int32_t i = 0; i < static_cast(GetCount()); ++i) operator[](i).SetPositionInResults(i); }