diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2017-06-15 10:20:24 +0300 |
---|---|---|
committer | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2017-06-16 14:19:03 +0300 |
commit | ab8d3579d50fddbc9296c769ec99cff06164f3cc (patch) | |
tree | 874f361ee405983c8ed6d147571a50863628bece /indexer/road_shields_parser.hpp | |
parent | 8606c53a1c1f19da6e736b5a71a6830cbd02a8af (diff) |
Improved metaline rendering
Diffstat (limited to 'indexer/road_shields_parser.hpp')
-rw-r--r-- | indexer/road_shields_parser.hpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/indexer/road_shields_parser.hpp b/indexer/road_shields_parser.hpp index 9133ab083d..1fd01aa001 100644 --- a/indexer/road_shields_parser.hpp +++ b/indexer/road_shields_parser.hpp @@ -2,6 +2,9 @@ #include "indexer/feature.hpp" +#include "geometry/rect2d.hpp" + +#include <map> #include <string> #include <vector> @@ -32,13 +35,20 @@ struct RoadShield RoadShield(RoadShieldType const & type, std::string const & name) : m_type(type), m_name(name) {} - RoadShield(RoadShieldType const & type, std::string const & name, std::string const & additionalText) + RoadShield(RoadShieldType const & type, std::string const & name, + std::string const & additionalText) : m_type(type), m_name(name), m_additionalText(additionalText) {} inline bool operator<(RoadShield const & other) const { - return m_type < other.m_type || m_name < other.m_name || m_additionalText < other.m_additionalText; + if (m_type == other.m_type) + { + if (m_name == other.m_name) + return m_additionalText < other.m_additionalText; + return m_name < other.m_name; + } + return m_type < other.m_type; } }; @@ -46,3 +56,6 @@ std::set<RoadShield> GetRoadShields(FeatureType const & f); std::string DebugPrint(RoadShieldType shieldType); std::string DebugPrint(RoadShield const & shield); } // namespace ftypes + +using GeneratedRoadShields = std::map<ftypes::RoadShield, std::vector<m2::RectD>>; + |