mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
DirectoryBlob: Lookup DiscContents by offset + size instead of offset
This simplifies DiscContentContainer::Read.
This commit is contained in:
parent
d6260e02ce
commit
1b1a75ee3a
2 changed files with 9 additions and 8 deletions
|
@ -42,12 +42,13 @@ public:
|
|||
explicit DiscContent(u64 offset);
|
||||
|
||||
u64 GetOffset() const;
|
||||
u64 GetEndOffset() const;
|
||||
u64 GetSize() const;
|
||||
bool Read(u64* offset, u64* length, u8** buffer) const;
|
||||
|
||||
bool operator==(const DiscContent& other) const { return m_offset == other.m_offset; }
|
||||
bool operator==(const DiscContent& other) const { return GetEndOffset() == other.GetEndOffset(); }
|
||||
bool operator!=(const DiscContent& other) const { return !(*this == other); }
|
||||
bool operator<(const DiscContent& other) const { return m_offset < other.m_offset; }
|
||||
bool operator<(const DiscContent& other) const { return GetEndOffset() < other.GetEndOffset(); }
|
||||
bool operator>(const DiscContent& other) const { return other < *this; }
|
||||
bool operator<=(const DiscContent& other) const { return !(*this < other); }
|
||||
bool operator>=(const DiscContent& other) const { return !(*this > other); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue