mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-19 09:57:02 +02:00
service: Make use of buffer element count helpers
This commit is contained in:
parent
ff19204dc6
commit
8c35c8c4a6
12 changed files with 41 additions and 47 deletions
|
|
@ -277,7 +277,7 @@ private:
|
|||
LOG_DEBUG(Service_FS, "called.");
|
||||
|
||||
// Calculate how many entries we can fit in the output buffer
|
||||
const u64 count_entries = ctx.GetWriteBufferSize() / sizeof(FileSys::Entry);
|
||||
const u64 count_entries = ctx.GetWriteBufferNumElements<FileSys::Entry>();
|
||||
|
||||
// Cap at total number of entries.
|
||||
const u64 actual_entries = std::min(count_entries, entries.size() - next_entry_index);
|
||||
|
|
@ -543,7 +543,7 @@ public:
|
|||
LOG_DEBUG(Service_FS, "called");
|
||||
|
||||
// Calculate how many entries we can fit in the output buffer
|
||||
const u64 count_entries = ctx.GetWriteBufferSize() / sizeof(SaveDataInfo);
|
||||
const u64 count_entries = ctx.GetWriteBufferNumElements<SaveDataInfo>();
|
||||
|
||||
// Cap at total number of entries.
|
||||
const u64 actual_entries = std::min(count_entries, info.size() - next_entry_index);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue