BinaryWriter: add a way to access the temp array.

That way, I'll be able to easily compute the CRC32 of it.
This commit is contained in:
Guillaume Jacquemin 2022-02-13 15:09:07 +01:00
parent 5e06c48492
commit 76210e147a
2 changed files with 5 additions and 0 deletions

View file

@ -46,6 +46,10 @@ auto BinaryWriter::position() -> Long {
return _ftelli64(_file);
}
auto BinaryWriter::array() const -> Containers::ArrayView<const char> {
return _data;
}
auto BinaryWriter::arrayPosition() const -> UnsignedLong {
return _index;
}

View file

@ -45,6 +45,7 @@ class BinaryWriter {
auto position() -> Long;
auto array() const -> Containers::ArrayView<const char>;
auto arrayPosition() const -> UnsignedLong;
auto flushToFile() -> bool;