DirectoryBlob: Change the return type of Add/CheckSizeAndAdd

Only return the information that isn't already known to the caller.
This commit is contained in:
JosJuice
2017-08-01 19:13:19 +02:00
parent 1b1a75ee3a
commit 78fa98f559
2 changed files with 25 additions and 23 deletions

View File

@ -63,14 +63,14 @@ class DiscContentContainer
{
public:
template <typename T>
const DiscContent& Add(u64 offset, const std::vector<T>& vector)
void Add(u64 offset, const std::vector<T>& vector)
{
return Add(offset, vector.size() * sizeof(T), reinterpret_cast<const u8*>(vector.data()));
}
const DiscContent& Add(u64 offset, u64 size, const std::string& path);
const DiscContent& Add(u64 offset, u64 size, const u8* data);
const DiscContent& CheckSizeAndAdd(u64 offset, const std::string& path);
const DiscContent& CheckSizeAndAdd(u64 offset, u64 max_size, const std::string& path);
void Add(u64 offset, u64 size, const std::string& path);
void Add(u64 offset, u64 size, const u8* data);
u64 CheckSizeAndAdd(u64 offset, const std::string& path);
u64 CheckSizeAndAdd(u64 offset, u64 max_size, const std::string& path);
bool Read(u64 offset, u64 length, u8* buffer) const;