Add a != operator to match the Prefix's == operator

This commit is contained in:
Rasmus Karlsson 2019-05-11 14:00:57 +02:00
parent ee9b0f4c12
commit 8bf9fc92c3
2 changed files with 6 additions and 0 deletions

View file

@ -99,6 +99,11 @@ bool Prefix::operator==(const Prefix &other) const
std::tie(other.first, other.second);
}
bool Prefix::operator!=(const Prefix &other) const
{
return !(*this == other);
}
bool Prefix::isStartOf(const QString &string) const
{
if (string.size() == 0)

View file

@ -12,6 +12,7 @@ class Prefix
public:
Prefix(const QString &string);
bool operator==(const Prefix &other) const;
bool operator!=(const Prefix &other) const;
bool isStartOf(const QString &string) const;
private: