mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-13 14:14:00 +01:00
streams: cache file position within AutoFile
This commit is contained in:
@@ -390,9 +390,10 @@ class AutoFile
|
||||
protected:
|
||||
std::FILE* m_file;
|
||||
std::vector<std::byte> m_xor;
|
||||
std::optional<int64_t> m_position;
|
||||
|
||||
public:
|
||||
explicit AutoFile(std::FILE* file, std::vector<std::byte> data_xor={}) : m_file{file}, m_xor{std::move(data_xor)} {}
|
||||
explicit AutoFile(std::FILE* file, std::vector<std::byte> data_xor={});
|
||||
|
||||
~AutoFile() { fclose(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user