]> git.saurik.com Git - wxWidgets.git/commitdiff
add comparison operators for UUID class (#9871)
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 18 Aug 2008 11:30:10 +0000 (11:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 18 Aug 2008 11:30:10 +0000 (11:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/ole/uuid.h
src/msw/ole/uuid.cpp

index 7bafccaa6027c2dc1bed1726484dfea727e8ce12..4cd02c9d89d8fe6a82f4ea72ba7ec1fd2147b4ca 100644 (file)
@@ -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); }
index 0b1020d84915dce7dda313f782864eae297d38b5..c21369b4ef0895263d0d1e60e5e74665f5808934 100644 (file)
@@ -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()
 {