mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 07:39:08 +01:00
Make BufferedFile to be a CAutoFile wrapper
This refactor allows to forward some calls to the underlying CAutoFile, instead of re-implementing the logic in the buffered file.
This commit is contained in:
@@ -20,7 +20,7 @@ static void FindByte(benchmark::Bench& bench)
|
||||
data[file_size-1] = 1;
|
||||
file << data;
|
||||
std::rewind(file.Get());
|
||||
BufferedFile bf{file.Get(), /*nBufSize=*/file_size + 1, /*nRewindIn=*/file_size, 0};
|
||||
BufferedFile bf{file, /*nBufSize=*/file_size + 1, /*nRewindIn=*/file_size};
|
||||
|
||||
bench.run([&] {
|
||||
bf.SetPos(0);
|
||||
|
||||
Reference in New Issue
Block a user