From ae5838ae822efd8943130113266d9e57810a4b36 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Thu, 7 Sep 2023 19:17:53 +1000 Subject: [PATCH] Drop OverrideStream --- src/streams.h | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/src/streams.h b/src/streams.h index d58de5233bcb0d..77f7319ee5bd01 100644 --- a/src/streams.h +++ b/src/streams.h @@ -45,45 +45,6 @@ inline void Xor(Span write, Span key, size_t key_off } } // namespace util -template -class OverrideStream -{ - Stream* stream; - - const int nVersion; - -public: - OverrideStream(Stream* stream_, int nVersion_) : stream{stream_}, nVersion{nVersion_} {} - - template - OverrideStream& operator<<(const T& obj) - { - ::Serialize(*this, obj); - return (*this); - } - - template - OverrideStream& operator>>(T&& obj) - { - ::Unserialize(*this, obj); - return (*this); - } - - void write(Span src) - { - stream->write(src); - } - - void read(Span dst) - { - stream->read(dst); - } - - int GetVersion() const { return nVersion; } - size_t size() const { return stream->size(); } - void ignore(size_t size) { return stream->ignore(size); } -}; - /* Minimal stream for overwriting and/or appending to an existing byte vector * * The referenced vector will grow as necessary