Use spans of std::byte in serialize

This switches .read() and .write() to take spans of bytes.
This commit is contained in:
MarcoFalke
2022-01-02 11:31:25 +01:00
parent fa65bbf217
commit fa24493d63
26 changed files with 195 additions and 184 deletions

View File

@@ -435,7 +435,7 @@ bool ReadRawBlockFromDisk(std::vector<uint8_t>& block, const FlatFilePos& pos, c
}
block.resize(blk_size); // Zeroing of memory is intentional here
filein.read((char*)block.data(), blk_size);
filein.read(MakeWritableByteSpan(block));
} catch (const std::exception& e) {
return error("%s: Read from block file failed: %s for %s", __func__, e.what(), pos.ToString());
}