From 2753fd96ffed24e04c4828eaa97dccfdb6b24764 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 18 Aug 2008 11:30:10 +0000 Subject: [PATCH] add comparison operators for UUID class (#9871) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/ole/uuid.h | 4 ++++ src/msw/ole/uuid.cpp | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/include/wx/msw/ole/uuid.h b/include/wx/msw/ole/uuid.h index 7bafccaa60..4cd02c9d89 100644 --- a/include/wx/msw/ole/uuid.h +++ b/include/wx/msw/ole/uuid.h @@ -74,6 +74,10 @@ public: bool Set(const wxChar *pc); // from a string, returns true if ok 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 operator const UUID*() const { return &m_uuid; } operator const wxChar*() const { return (wxChar *)(m_pszUuid); } diff --git a/src/msw/ole/uuid.cpp b/src/msw/ole/uuid.cpp index 0b1020d849..c21369b4ef 100644 --- a/src/msw/ole/uuid.cpp +++ b/src/msw/ole/uuid.cpp @@ -82,6 +82,16 @@ Uuid& Uuid::operator=(const Uuid& uuid) 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 Uuid::~Uuid() { -- 2.50.0