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:
committed by
Jack Grigg
parent
670a7686a6
commit
1315591c85
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user