From 715006802a65fa5f541f2f4bcccbdd62d1a2bf09 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 15 Aug 2018 23:55:56 +0300 Subject: [PATCH] Change template parameter name to not be the same as the typedef for it --- source/choicecondition.h | 24 ++++++++++++------------ source/rangecondition.h | 18 +++++++++--------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/source/choicecondition.h b/source/choicecondition.h index df4dacf..6e2954d 100644 --- a/source/choicecondition.h +++ b/source/choicecondition.h @@ -42,32 +42,32 @@ struct BaseTypeTraits typedef ChoiceCondition BaseTypeCondition; -template -ChoiceCondition::ChoiceCondition(Type v): +template +ChoiceCondition::ChoiceCondition(Type v): value(v) { } -template -Condition *ChoiceCondition::clone() const +template +Condition *ChoiceCondition::clone() const { - return new ChoiceCondition(value); + return new ChoiceCondition(values); } -template -bool ChoiceCondition::can_merge(const Condition &other, const CompoundCondition &parent) const +template +bool ChoiceCondition::can_merge(const Condition &other, const CompoundCondition &parent) const { - return dynamic_cast *>(&other) && dynamic_cast(&parent); + return dynamic_cast *>(&other) && dynamic_cast(&parent); } -template -void ChoiceCondition::add_lines(std::list &st) const +template +void ChoiceCondition::add_lines(std::list &st) const { const char *keyword = Traits::get_keyword(); FilterStatement::add_line(st, Msp::format("%s \"%s\"", keyword, value)); } -template -void ChoiceCondition::add_merged_lines(const std::vector &conditions, const CompoundCondition &parent, std::list &st) const +template +void ChoiceCondition::add_merged_lines(const std::vector &conditions, const CompoundCondition &parent, std::list &st) const { if(dynamic_cast(&parent)) { diff --git a/source/rangecondition.h b/source/rangecondition.h index d4cc19a..c107287 100644 --- a/source/rangecondition.h +++ b/source/rangecondition.h @@ -112,26 +112,26 @@ struct LinkedSocketsTraits typedef RangeCondition LinkedSocketsCondition; -template -RangeCondition::RangeCondition(Type v): +template +RangeCondition::RangeCondition(Type v): min(v), max(v) { } -template -RangeCondition::RangeCondition(Type n, Type x): +template +RangeCondition::RangeCondition(Type n, Type x): min(n), max(x) { } -template -Condition *RangeCondition::clone() const +template +Condition *RangeCondition::clone() const { - return new RangeCondition(min, max); + return new RangeCondition(min, max); } -template -void RangeCondition::add_lines(std::list &st) const +template +void RangeCondition::add_lines(std::list &st) const { const char *keyword = Traits::get_keyword(); if(min==max) -- 2.45.2