diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2016-10-28 21:55:12 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-11-07 09:39:46 -0800 |
commit | c2c5d42f36f4440aaddc4a64974a52fdb07af08b (patch) | |
tree | 121eb8fbd0c3fa2378c900bd411c3a6c0eb7d2ab /src/script | |
parent | 50e8a9ccd78c8c20c3eac6618da7293078446b58 (diff) |
Make streams' read and write return void
The stream implementations had two cascading layers (the upper one
with operator<< and operator>>, and a lower one with read and write).
The lower layer's functions are never cascaded (nor should they, as
they should only be used from the higher layer), so make them return
void instead.
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/bitcoinconsensus.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/bitcoinconsensus.cpp b/src/script/bitcoinconsensus.cpp index 1d0ca0c5ac..4e2358d9a2 100644 --- a/src/script/bitcoinconsensus.cpp +++ b/src/script/bitcoinconsensus.cpp @@ -23,7 +23,7 @@ public: m_remaining(txToLen) {} - TxInputStream& read(char* pch, size_t nSize) + void read(char* pch, size_t nSize) { if (nSize > m_remaining) throw std::ios_base::failure(std::string(__func__) + ": end of data"); @@ -37,7 +37,6 @@ public: memcpy(pch, m_data, nSize); m_remaining -= nSize; m_data += nSize; - return *this; } template<typename T> |