From 3e6f90c557b88237b1c19984d2a6a3c2736c6b38 Mon Sep 17 00:00:00 2001 From: vng Date: Wed, 30 Dec 2015 17:02:20 +0300 Subject: [PATCH] Review fixes. --- indexer/mwm_set.cpp | 6 +++--- indexer/mwm_set.hpp | 6 ------ search/search_query.cpp | 4 ++-- search/search_query.hpp | 2 +- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/indexer/mwm_set.cpp b/indexer/mwm_set.cpp index b0224cc0c3..97592cabdd 100644 --- a/indexer/mwm_set.cpp +++ b/indexer/mwm_set.cpp @@ -37,16 +37,16 @@ string DebugPrint(MwmSet::MwmId const & id) return ss.str(); } -MwmSet::MwmHandle::MwmHandle() : m_mwmSet(nullptr), m_mwmId(), m_value(nullptr) {} +MwmSet::MwmHandle::MwmHandle() : m_mwmSet(nullptr), m_value(nullptr) {} MwmSet::MwmHandle::MwmHandle(MwmSet & mwmSet, MwmId const & mwmId, unique_ptr && value) - : m_mwmSet(&mwmSet), m_mwmId(mwmId), m_value(move(value)) + : m_mwmId(mwmId), m_mwmSet(&mwmSet), m_value(move(value)) { } MwmSet::MwmHandle::MwmHandle(MwmHandle && handle) - : m_mwmSet(handle.m_mwmSet), m_mwmId(handle.m_mwmId), m_value(move(handle.m_value)) + : m_mwmId(handle.m_mwmId), m_mwmSet(handle.m_mwmSet), m_value(move(handle.m_value)) { handle.m_mwmSet = nullptr; handle.m_mwmId.Reset(); diff --git a/indexer/mwm_set.hpp b/indexer/mwm_set.hpp index ddfd882947..5ae2c17e6f 100644 --- a/indexer/mwm_set.hpp +++ b/indexer/mwm_set.hpp @@ -86,7 +86,6 @@ public: MwmId() = default; MwmId(shared_ptr const & info) : m_info(info) {} - MwmId(MwmId const & mwmId): m_info(mwmId.m_info) {} void Reset() { m_info.reset(); } bool IsAlive() const @@ -98,11 +97,6 @@ public: inline bool operator==(MwmId const & rhs) const { return GetInfo() == rhs.GetInfo(); } inline bool operator!=(MwmId const & rhs) const { return !(*this == rhs); } inline bool operator<(MwmId const & rhs) const { return GetInfo() < rhs.GetInfo(); } - inline MwmId & operator=(MwmId const & rhs) - { - m_info = rhs.m_info; - return *this; - } friend string DebugPrint(MwmId const & id); diff --git a/search/search_query.cpp b/search/search_query.cpp index b37cbdf4de..341be8feb1 100644 --- a/search/search_query.cpp +++ b/search/search_query.cpp @@ -170,7 +170,7 @@ Query::RetrievalCallback::RetrievalCallback(Index & index, Query & query, Viewpo void Query::RetrievalCallback::OnFeaturesRetrieved(MwmSet::MwmId const & id, double scale, coding::CompressedBitVector const & features) { - auto const & table = m_rankTable.Get(m_index, id); + auto const & table = m_rankTableCache.Get(m_index, id); coding::CompressedBitVectorEnumerator::ForEach( features, [&](uint64_t featureId) @@ -183,7 +183,7 @@ void Query::RetrievalCallback::OnFeaturesRetrieved(MwmSet::MwmId const & id, dou void Query::RetrievalCallback::OnMwmProcessed(MwmSet::MwmId const & id) { - m_rankTable.Remove(id); + m_rankTableCache.Remove(id); } // static diff --git a/search/search_query.hpp b/search/search_query.hpp index 89232ccd77..f63d08829a 100644 --- a/search/search_query.hpp +++ b/search/search_query.hpp @@ -147,7 +147,7 @@ protected: Index & m_index; Query & m_query; ViewportID m_viewportId; - search::v2::RankTableCache m_rankTable; + search::v2::RankTableCache m_rankTableCache; }; friend class impl::FeatureLoader;