mirror of
https://github.com/PabloMK7/citra.git
synced 2025-10-11 20:10:03 +00:00
code: Use std::span where appropriate (#6658)
* code: Use std::span when possible * code: Prefix memcpy and memcmp with std::
This commit is contained in:
parent
4ccd9f24fb
commit
cf9bb90ae3
106 changed files with 362 additions and 329 deletions
|
@ -223,7 +223,7 @@ ResultVal<std::size_t> CIAFile::Write(u64 offset, std::size_t length, bool flush
|
|||
std::size_t buf_max_size =
|
||||
std::min(static_cast<std::size_t>(offset + length), FileSys::CIA_HEADER_SIZE);
|
||||
data.resize(buf_max_size);
|
||||
memcpy(data.data() + offset, buffer, buf_copy_size);
|
||||
std::memcpy(data.data() + offset, buffer, buf_copy_size);
|
||||
|
||||
// We have enough data to load a CIA header and parse it.
|
||||
if (written >= FileSys::CIA_HEADER_SIZE) {
|
||||
|
@ -248,7 +248,7 @@ ResultVal<std::size_t> CIAFile::Write(u64 offset, std::size_t length, bool flush
|
|||
buf_offset;
|
||||
std::size_t buf_max_size = std::min(offset + length, container.GetContentOffset());
|
||||
data.resize(buf_max_size);
|
||||
memcpy(data.data() + copy_offset, buffer + buf_offset, buf_copy_size);
|
||||
std::memcpy(data.data() + copy_offset, buffer + buf_offset, buf_copy_size);
|
||||
}
|
||||
|
||||
// TODO(shinyquagsire23): Write out .tik files to nand?
|
||||
|
@ -850,7 +850,7 @@ void Module::Interface::GetProgramList(Kernel::HLERequestContext& ctx) {
|
|||
rb.PushMappedBuffer(title_ids_output);
|
||||
}
|
||||
|
||||
ResultCode GetTitleInfoFromList(const std::vector<u64>& title_id_list,
|
||||
ResultCode GetTitleInfoFromList(std::span<const u64> title_id_list,
|
||||
Service::FS::MediaType media_type,
|
||||
Kernel::MappedBuffer& title_info_out) {
|
||||
std::size_t write_offset = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue