diff options
author | Maxim Pimenov <m@maps.me> | 2019-03-11 16:51:05 +0300 |
---|---|---|
committer | Maksim Andrianov <maksimandrianov1@gmail.com> | 2019-03-11 18:30:42 +0300 |
commit | c87cb978e62f1eb4850639abb299aba46d2e13f5 (patch) | |
tree | 3812afa8dc4084784dc350df1ca67f2c8d2d0729 /indexer | |
parent | c1d4305454b1115fabca3e8f86ad80e0fce4f8e0 (diff) |
Several explicit constructors per the Cppcheck report.
Diffstat (limited to 'indexer')
-rw-r--r-- | indexer/drawing_rules.cpp | 15 | ||||
-rw-r--r-- | indexer/feature_visibility.cpp | 2 |
2 files changed, 8 insertions, 9 deletions
diff --git a/indexer/drawing_rules.cpp b/indexer/drawing_rules.cpp index c0e29e4cb9..c422d5522c 100644 --- a/indexer/drawing_rules.cpp +++ b/indexer/drawing_rules.cpp @@ -217,7 +217,7 @@ namespace { LineDefProto m_line; public: - Line(LineRuleProto const & r) + explicit Line(LineRuleProto const & r) { m_line.set_color(r.color()); m_line.set_width(r.width()); @@ -236,7 +236,7 @@ namespace { AreaRuleProto m_area; public: - Area(AreaRuleProto const & r) : m_area(r) {} + explicit Area(AreaRuleProto const & r) : m_area(r) {} virtual AreaRuleProto const * GetArea() const { return &m_area; } }; @@ -245,7 +245,7 @@ namespace { SymbolRuleProto m_symbol; public: - Symbol(SymbolRuleProto const & r) : m_symbol(r) + explicit Symbol(SymbolRuleProto const & r) : m_symbol(r) { SetType(r.apply_for_type()); } @@ -261,9 +261,8 @@ namespace text_type_t m_textTypeSecondary; public: - CaptionT(T const & r) : m_caption(r) - , m_textTypePrimary(text_type_name) - , m_textTypeSecondary(text_type_name) + explicit CaptionT(T const & r) + : m_caption(r), m_textTypePrimary(text_type_name), m_textTypeSecondary(text_type_name) { if (!m_caption.primary().text().empty()) m_textTypePrimary = GetTextType(m_caption.primary().text()); @@ -305,7 +304,7 @@ namespace { ShieldRuleProto m_shield; public: - Shield(ShieldRuleProto const & r) : m_shield(r) {} + explicit Shield(ShieldRuleProto const & r) : m_shield(r) {} virtual ShieldRuleProto const * GetShield() const { return &m_shield; } }; @@ -408,7 +407,7 @@ namespace } public: - DoSetIndex(RulesHolder & holder) + explicit DoSetIndex(RulesHolder & holder) : m_holder(holder) {} void operator() (ClassifObject * p) diff --git a/indexer/feature_visibility.cpp b/indexer/feature_visibility.cpp index a71329769d..51077d6a85 100644 --- a/indexer/feature_visibility.cpp +++ b/indexer/feature_visibility.cpp @@ -136,7 +136,7 @@ namespace int m_scale; public: - IsDrawableChecker(int scale) : m_scale(scale) {} + explicit IsDrawableChecker(int scale) : m_scale(scale) {} typedef bool ResultType; |