diff --git a/common/eda_pattern_match.cpp b/common/eda_pattern_match.cpp index 4f7e57d42d..7e45900799 100644 --- a/common/eda_pattern_match.cpp +++ b/common/eda_pattern_match.cpp @@ -239,7 +239,7 @@ bool EDA_PATTERN_MATCH_RELATIONAL::SetPattern( const wxString& aPattern ) // Matching on empty values keeps the match list from going empty when // the user types the relational operator character, which helps prevent // confusion. - m_relation = NONE; + m_relation = ANY; } else if( !val.ToCDouble( &m_value ) ) return false; @@ -317,13 +317,13 @@ int EDA_PATTERN_MATCH_RELATIONAL::FindOne( const wxString& aCandidate ) const switch( m_relation ) { - case LT: return val_parsed < m_value ? istart : EDA_PATTERN_NOT_FOUND; - case LE: return val_parsed <= m_value ? istart : EDA_PATTERN_NOT_FOUND; - case EQ: return val_parsed == m_value ? istart : EDA_PATTERN_NOT_FOUND; - case GE: return val_parsed >= m_value ? istart : EDA_PATTERN_NOT_FOUND; - case GT: return val_parsed > m_value ? istart : EDA_PATTERN_NOT_FOUND; - case NONE: return istart; - default: return EDA_PATTERN_NOT_FOUND; + case LT: return val_parsed < m_value ? istart : EDA_PATTERN_NOT_FOUND; + case LE: return val_parsed <= m_value ? istart : EDA_PATTERN_NOT_FOUND; + case EQ: return val_parsed == m_value ? istart : EDA_PATTERN_NOT_FOUND; + case GE: return val_parsed >= m_value ? istart : EDA_PATTERN_NOT_FOUND; + case GT: return val_parsed > m_value ? istart : EDA_PATTERN_NOT_FOUND; + case ANY: return istart; + default: return EDA_PATTERN_NOT_FOUND; } } diff --git a/include/eda_pattern_match.h b/include/eda_pattern_match.h index 0d1b040a7f..1600b20be0 100644 --- a/include/eda_pattern_match.h +++ b/include/eda_pattern_match.h @@ -154,7 +154,7 @@ public: protected: - enum RELATION { LT, LE, EQ, GE, GT, NONE }; + enum RELATION { LT, LE, EQ, GE, GT, ANY }; wxString m_pattern; wxString m_key;