Fix wxTypeIdentifier::operator==() to be const
Comparing things doesn't change them. Also rewrite operator!=() in terms of operator==() to ensure consistency.
This commit is contained in:
parent
0d62f728ae
commit
ef0309c141
@ -68,14 +68,14 @@ public:
|
||||
m_className = className;
|
||||
}
|
||||
|
||||
bool operator==(const wxTypeIdentifier& other)
|
||||
bool operator==(const wxTypeIdentifier& other) const
|
||||
{
|
||||
return strcmp(m_className, other.m_className) == 0;
|
||||
}
|
||||
|
||||
bool operator!=(const wxTypeIdentifier& other)
|
||||
bool operator!=(const wxTypeIdentifier& other) const
|
||||
{
|
||||
return strcmp(m_className, other.m_className) != 0;
|
||||
return !(*this == other);
|
||||
}
|
||||
private:
|
||||
const char* m_className;
|
||||
|
Loading…
Reference in New Issue
Block a user