Skip to content
Snippets Groups Projects
Commit f7e93579 authored by AlQuemist's avatar AlQuemist
Browse files

Sample/Lattice/ISelectionRule: add explicit implementation of operator ==

parent f7c4b1c1
No related branches found
No related tags found
1 merge request!2727Avoid using C++20 features to keep the libraries maintainable on older systems
......@@ -38,3 +38,8 @@ bool SimpleSelectionRule::isEqualTo(const ISelectionRule& isr) const
return *this == *sr;
return false;
}
bool SimpleSelectionRule::operator==(const SimpleSelectionRule& other) const
{
return (m_a == other.m_a && m_b == other.m_b && m_c == other.m_c && m_mod == other.m_mod);
}
......@@ -29,7 +29,7 @@ public:
virtual bool isEqualTo(const ISelectionRule& isr) const = 0;
bool operator==(const ISelectionRule&) const = default;
bool operator==(const ISelectionRule&) const { return false; }
};
//! Selection rule (v*q)%modulus!=0, defined by vector v(a,b,c) and modulus.
......@@ -45,7 +45,7 @@ public:
bool isEqualTo(const ISelectionRule& isr) const override;
bool operator==(const SimpleSelectionRule&) const = default;
bool operator==(const SimpleSelectionRule& other) const;
private:
int m_a, m_b, m_c;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment