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.
This commit is contained in:
Pieter Wuille
2016-10-28 21:55:12 -07:00
committed by Jack Grigg
parent 670a7686a6
commit 1315591c85
4 changed files with 12 additions and 22 deletions

View File

@@ -24,7 +24,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");
@@ -38,7 +38,6 @@ public:
memcpy(pch, m_data, nSize);
m_remaining -= nSize;
m_data += nSize;
return *this;
}
template<typename T>