mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-16 22:21:55 +00:00
GameFile: Default GameBanner operator==
Same behavior, but less code.
This commit is contained in:
parent
d84ed054ee
commit
cdf8849e17
@ -70,16 +70,6 @@ DiscIO::Language GameFile::GetConfigLanguage() const
|
|||||||
return SConfig::GetInstance().GetLanguageAdjustedForRegion(DiscIO::IsWii(m_platform), m_region);
|
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::string& GameFile::Lookup(DiscIO::Language language,
|
||||||
const std::map<DiscIO::Language, std::string>& strings)
|
const std::map<DiscIO::Language, std::string>& strings)
|
||||||
{
|
{
|
||||||
|
@ -27,6 +27,9 @@ struct GameBanner
|
|||||||
std::vector<u32> buffer;
|
std::vector<u32> buffer;
|
||||||
u32 width{};
|
u32 width{};
|
||||||
u32 height{};
|
u32 height{};
|
||||||
|
|
||||||
|
bool operator==(const GameBanner&) const = default;
|
||||||
|
|
||||||
bool empty() const { return buffer.empty(); }
|
bool empty() const { return buffer.empty(); }
|
||||||
void DoState(PointerWrap& p);
|
void DoState(PointerWrap& p);
|
||||||
};
|
};
|
||||||
@ -38,9 +41,6 @@ struct GameCover
|
|||||||
void DoState(PointerWrap& p);
|
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).
|
// This class caches the metadata of a DiscIO::Volume (or a DOL/ELF file).
|
||||||
class GameFile final
|
class GameFile final
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user