mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Add a != operator to match the Prefix's == operator
This commit is contained in:
parent
ee9b0f4c12
commit
8bf9fc92c3
2 changed files with 6 additions and 0 deletions
|
@ -99,6 +99,11 @@ bool Prefix::operator==(const Prefix &other) const
|
||||||
std::tie(other.first, other.second);
|
std::tie(other.first, other.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Prefix::operator!=(const Prefix &other) const
|
||||||
|
{
|
||||||
|
return !(*this == other);
|
||||||
|
}
|
||||||
|
|
||||||
bool Prefix::isStartOf(const QString &string) const
|
bool Prefix::isStartOf(const QString &string) const
|
||||||
{
|
{
|
||||||
if (string.size() == 0)
|
if (string.size() == 0)
|
||||||
|
|
|
@ -12,6 +12,7 @@ class Prefix
|
||||||
public:
|
public:
|
||||||
Prefix(const QString &string);
|
Prefix(const QString &string);
|
||||||
bool operator==(const Prefix &other) const;
|
bool operator==(const Prefix &other) const;
|
||||||
|
bool operator!=(const Prefix &other) const;
|
||||||
bool isStartOf(const QString &string) const;
|
bool isStartOf(const QString &string) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in a new issue