add comparison operators for UUID class (#9871)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -74,6 +74,10 @@ public:
|
|||||||
bool Set(const wxChar *pc); // from a string, returns true if ok
|
bool Set(const wxChar *pc); // from a string, returns true if ok
|
||||||
void Set(const UUID& uuid); // from another UUID (never fails)
|
void Set(const UUID& uuid); // from another UUID (never fails)
|
||||||
|
|
||||||
|
// comparison operators
|
||||||
|
bool operator==(const Uuid& uuid) const;
|
||||||
|
bool operator!=(const Uuid& uuid) const;
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
operator const UUID*() const { return &m_uuid; }
|
operator const UUID*() const { return &m_uuid; }
|
||||||
operator const wxChar*() const { return (wxChar *)(m_pszUuid); }
|
operator const wxChar*() const { return (wxChar *)(m_pszUuid); }
|
||||||
|
@@ -82,6 +82,16 @@ Uuid& Uuid::operator=(const Uuid& uuid)
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Uuid::operator==(const Uuid& uuid) const
|
||||||
|
{
|
||||||
|
return m_uuid == uuid.m_uuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Uuid::operator!=(const Uuid& uuid) const
|
||||||
|
{
|
||||||
|
return m_uuid != uuid.m_uuid;
|
||||||
|
}
|
||||||
|
|
||||||
// dtor
|
// dtor
|
||||||
Uuid::~Uuid()
|
Uuid::~Uuid()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user