From 6045b442034d1baa9c88b37b4b271dda4ed240c2 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 13 Mar 2019 15:55:16 -0400 Subject: [PATCH] UICommon/ResourcePack: Provide inequality operator to complement equality operator Provides symmetrical behavior with the equality operator. --- Source/Core/UICommon/ResourcePack/ResourcePack.cpp | 5 +++++ Source/Core/UICommon/ResourcePack/ResourcePack.h | 1 + 2 files changed, 6 insertions(+) diff --git a/Source/Core/UICommon/ResourcePack/ResourcePack.cpp b/Source/Core/UICommon/ResourcePack/ResourcePack.cpp index f80b5e0caf..e52034f508 100644 --- a/Source/Core/UICommon/ResourcePack/ResourcePack.cpp +++ b/Source/Core/UICommon/ResourcePack/ResourcePack.cpp @@ -325,4 +325,9 @@ bool ResourcePack::operator==(const ResourcePack& pack) const return pack.GetPath() == m_path; } +bool ResourcePack::operator!=(const ResourcePack& pack) const +{ + return !operator==(pack); +} + } // namespace ResourcePack diff --git a/Source/Core/UICommon/ResourcePack/ResourcePack.h b/Source/Core/UICommon/ResourcePack/ResourcePack.h index 9d5e29af60..6979f5620a 100644 --- a/Source/Core/UICommon/ResourcePack/ResourcePack.h +++ b/Source/Core/UICommon/ResourcePack/ResourcePack.h @@ -31,6 +31,7 @@ public: bool Uninstall(const std::string& path); bool operator==(const ResourcePack& pack) const; + bool operator!=(const ResourcePack& pack) const; private: bool m_valid = true;