Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Kuznetsov <r.kuznetsow@gmail.com>2017-07-08 23:19:54 +0300
committerIlya Zverev <ilya@zverev.info>2017-07-10 19:29:38 +0300
commit506c86b32474a361a80f01b41942f5df6b9fb4cc (patch)
tree5c823c615e4ae92f7e95d9f1f6e37660dfc88cd9 /indexer/drawing_rules.cpp
parent83a05025606a463b6c87c90d538117c7502ad281 (diff)
Updated protobuf to 3.3.0
Diffstat (limited to 'indexer/drawing_rules.cpp')
-rw-r--r--indexer/drawing_rules.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/indexer/drawing_rules.cpp b/indexer/drawing_rules.cpp
index bab36bc230..700f54399d 100644
--- a/indexer/drawing_rules.cpp
+++ b/indexer/drawing_rules.cpp
@@ -219,14 +219,12 @@ namespace
{
m_line.set_color(r.color());
m_line.set_width(r.width());
+ m_line.set_join(r.join());
+ m_line.set_cap(r.cap());
if (r.has_dashdot())
*(m_line.mutable_dashdot()) = r.dashdot();
if (r.has_pathsym())
*(m_line.mutable_pathsym()) = r.pathsym();
- if (r.has_join())
- m_line.set_join(r.join());
- if (r.has_cap())
- m_line.set_cap(r.cap());
}
virtual LineDefProto const * GetLine() const { return &m_line; }
@@ -247,8 +245,7 @@ namespace
public:
Symbol(SymbolRuleProto const & r) : m_symbol(r)
{
- if (r.has_apply_for_type())
- SetType(r.apply_for_type());
+ SetType(r.apply_for_type());
}
virtual SymbolRuleProto const * GetSymbol() const { return &m_symbol; }
@@ -266,10 +263,10 @@ namespace
, m_textTypePrimary(text_type_name)
, m_textTypeSecondary(text_type_name)
{
- if (m_caption.primary().has_text())
+ if (!m_caption.primary().text().empty())
m_textTypePrimary = GetTextType(m_caption.primary().text());
- if (m_caption.has_secondary() && m_caption.secondary().has_text())
+ if (m_caption.has_secondary() && !m_caption.secondary().text().empty())
m_textTypeSecondary = GetTextType(m_caption.secondary().text());
}
@@ -484,11 +481,11 @@ void RulesHolder::InitBackgroundColors(ContainerProto const & cont)
{
// Take the color of the draw element
AreaRuleProto const & rule = de.area();
- if (rule.has_color())
+ if (rule.color() != 0)
{
bgColorDefault = rule.color();
- if (de.has_scale())
+ if (de.scale() != 0)
bgColorForScale.insert(make_pair(de.scale(), rule.color()));
}
}