diff options
author | Maxim Pimenov <m@maps.me> | 2016-08-10 21:10:14 +0300 |
---|---|---|
committer | Maxim Pimenov <m@maps.me> | 2016-08-26 11:29:18 +0300 |
commit | 9bb96c840c00be0d33fec3db8b2301bd5e015e6d (patch) | |
tree | 0251b46b1d40190dda2df3c42526e7628b477173 /storage | |
parent | 158b1b4a40b4a269d203c9de03e65db4955ecb52 (diff) |
[search] Get rid of duplication in the downloader search.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/downloader_search_params.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/storage/downloader_search_params.hpp b/storage/downloader_search_params.hpp index b33e92da00..fee97e081f 100644 --- a/storage/downloader_search_params.hpp +++ b/storage/downloader_search_params.hpp @@ -15,6 +15,18 @@ struct DownloaderSearchResult { } + bool operator==(DownloaderSearchResult const & rhs) const + { + return m_countryId == rhs.m_countryId && m_matchedName == rhs.m_matchedName; + } + + bool operator<(DownloaderSearchResult const & rhs) const + { + if (m_countryId != rhs.m_countryId) + return m_countryId < rhs.m_countryId; + return m_matchedName < rhs.m_matchedName; + } + TCountryId m_countryId; /// \brief |m_matchedName| is a name of found feature in case of searching in World.mwm /// and is a local name of mwm (group or leaf) in case of searching in country tree. |