io/Reader: use std::span

This commit is contained in:
Max Kellermann
2023-10-05 10:25:16 +02:00
parent b9704715fb
commit 7ccc4ddf0d
19 changed files with 52 additions and 51 deletions

View File

@@ -60,7 +60,7 @@ static constexpr unsigned rom_size = 8192;
static void loadRom(const Path rom_path, uint8_t *dump)
{
FileReader romDump(rom_path);
if (romDump.Read(dump, rom_size) != rom_size)
if (romDump.Read(std::as_writable_bytes(std::span{dump, rom_size})) != rom_size)
throw FmtRuntimeError("Could not load rom dump '{}'", rom_path);
}