Skip to content
Permalink
Browse files

Merge pull request #7888 from lioncash/const

 UICommon/ResourcePack: Mark ResourcePack's operator== as const
  • Loading branch information...
JosJuice committed Mar 13, 2019
2 parents 635afc1 + 6045b44 commit bc9e9caf19749778d01b9721a1ff92acccf70fac
@@ -320,9 +320,14 @@ bool ResourcePack::Uninstall(const std::string& path)
return true;
}

bool ResourcePack::operator==(const ResourcePack& pack)
bool ResourcePack::operator==(const ResourcePack& pack) const
{
return pack.GetPath() == m_path;
}

bool ResourcePack::operator!=(const ResourcePack& pack) const
{
return !operator==(pack);
}

} // namespace ResourcePack
@@ -30,7 +30,8 @@ class ResourcePack
bool Install(const std::string& path);
bool Uninstall(const std::string& path);

bool operator==(const ResourcePack& pack);
bool operator==(const ResourcePack& pack) const;
bool operator!=(const ResourcePack& pack) const;

private:
bool m_valid = true;

0 comments on commit bc9e9ca

Please sign in to comment.
You can’t perform that action at this time.