Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GameFile: Default GameBanner operator== #12388

Merged
merged 1 commit into from Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 0 additions & 10 deletions Source/Core/UICommon/GameFile.cpp
Expand Up @@ -70,16 +70,6 @@ DiscIO::Language GameFile::GetConfigLanguage() const
return SConfig::GetInstance().GetLanguageAdjustedForRegion(DiscIO::IsWii(m_platform), m_region);
}

bool operator==(const GameBanner& lhs, const GameBanner& rhs)
{
return std::tie(lhs.buffer, lhs.width, lhs.height) == std::tie(rhs.buffer, rhs.width, rhs.height);
}

bool operator!=(const GameBanner& lhs, const GameBanner& rhs)
{
return !operator==(lhs, rhs);
}

const std::string& GameFile::Lookup(DiscIO::Language language,
const std::map<DiscIO::Language, std::string>& strings)
{
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/UICommon/GameFile.h
Expand Up @@ -27,6 +27,9 @@ struct GameBanner
std::vector<u32> buffer;
u32 width{};
u32 height{};

bool operator==(const GameBanner&) const = default;

bool empty() const { return buffer.empty(); }
void DoState(PointerWrap& p);
};
Expand All @@ -38,9 +41,6 @@ struct GameCover
void DoState(PointerWrap& p);
};

bool operator==(const GameBanner& lhs, const GameBanner& rhs);
bool operator!=(const GameBanner& lhs, const GameBanner& rhs);

// This class caches the metadata of a DiscIO::Volume (or a DOL/ELF file).
class GameFile final
{
Expand Down