]> git.tdb.fi Git - poefilter.git/commitdiff
Change template parameter name to not be the same as the typedef for it
authorMikko Rasa <tdb@tdb.fi>
Wed, 15 Aug 2018 20:55:56 +0000 (23:55 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 15 Aug 2018 21:01:25 +0000 (00:01 +0300)
source/choicecondition.h
source/rangecondition.h

index df4dacfd5c3e10f5e78abf9ad558f3e2e73a3b37..6e2954dbf04790ea6ebfb1a3530463880dcf2b93 100644 (file)
@@ -42,32 +42,32 @@ struct BaseTypeTraits
 typedef ChoiceCondition<BaseTypeTraits> BaseTypeCondition;
 
 
-template<typename Traits>
-ChoiceCondition<Traits>::ChoiceCondition(Type v):
+template<typename T>
+ChoiceCondition<T>::ChoiceCondition(Type v):
        value(v)
 { }
 
-template<typename Traits>
-Condition *ChoiceCondition<Traits>::clone() const
+template<typename T>
+Condition *ChoiceCondition<T>::clone() const
 {
-       return new ChoiceCondition<Traits>(value);
+       return new ChoiceCondition<T>(values);
 }
 
-template<typename Traits>
-bool ChoiceCondition<Traits>::can_merge(const Condition &other, const CompoundCondition &parent) const
+template<typename T>
+bool ChoiceCondition<T>::can_merge(const Condition &other, const CompoundCondition &parent) const
 {
-       return dynamic_cast<const ChoiceCondition<Traits> *>(&other) && dynamic_cast<const OrCondition *>(&parent);
+       return dynamic_cast<const ChoiceCondition<T> *>(&other) && dynamic_cast<const OrCondition *>(&parent);
 }
 
-template<typename Traits>
-void ChoiceCondition<Traits>::add_lines(std::list<FilterStatement> &st) const
+template<typename T>
+void ChoiceCondition<T>::add_lines(std::list<FilterStatement> &st) const
 {
        const char *keyword = Traits::get_keyword();
        FilterStatement::add_line(st, Msp::format("%s \"%s\"", keyword, value));
 }
 
-template<typename Traits>
-void ChoiceCondition<Traits>::add_merged_lines(const std::vector<Condition *> &conditions, const CompoundCondition &parent, std::list<FilterStatement> &st) const
+template<typename T>
+void ChoiceCondition<T>::add_merged_lines(const std::vector<Condition *> &conditions, const CompoundCondition &parent, std::list<FilterStatement> &st) const
 {
        if(dynamic_cast<const OrCondition *>(&parent))
        {
index d4cc19a7889e460351506628d37c0b89bfdd8a4f..c107287919f2fe69140fe347ed54c659ad74bdc6 100644 (file)
@@ -112,26 +112,26 @@ struct LinkedSocketsTraits
 typedef RangeCondition<LinkedSocketsTraits> LinkedSocketsCondition;
 
 
-template<typename Traits>
-RangeCondition<Traits>::RangeCondition(Type v):
+template<typename T>
+RangeCondition<T>::RangeCondition(Type v):
        min(v),
        max(v)
 { }
 
-template<typename Traits>
-RangeCondition<Traits>::RangeCondition(Type n, Type x):
+template<typename T>
+RangeCondition<T>::RangeCondition(Type n, Type x):
        min(n),
        max(x)
 { }
 
-template<typename Traits>
-Condition *RangeCondition<Traits>::clone() const
+template<typename T>
+Condition *RangeCondition<T>::clone() const
 {
-       return new RangeCondition<Traits>(min, max);
+       return new RangeCondition<T>(min, max);
 }
 
-template<typename Traits>
-void RangeCondition<Traits>::add_lines(std::list<FilterStatement> &st) const
+template<typename T>
+void RangeCondition<T>::add_lines(std::list<FilterStatement> &st) const
 {
        const char *keyword = Traits::get_keyword();
        if(min==max)