aboutsummaryrefslogtreecommitdiff
path: root/src/hash.h
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2016-10-28 21:55:12 -0700
committerPieter Wuille <[email protected]>2016-11-07 09:39:46 -0800
commitc2c5d42f36f4440aaddc4a64974a52fdb07af08b (patch)
tree121eb8fbd0c3fa2378c900bd411c3a6c0eb7d2ab /src/hash.h
parentRemove unused ReadVersion and WriteVersion (diff)
downloaddiscoin-c2c5d42f36f4440aaddc4a64974a52fdb07af08b.tar.xz
discoin-c2c5d42f36f4440aaddc4a64974a52fdb07af08b.zip
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/hash.h')
-rw-r--r--src/hash.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/hash.h b/src/hash.h
index db4e130ae..88926ab31 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -138,9 +138,8 @@ public:
CHashWriter(int nTypeIn, int nVersionIn) : nType(nTypeIn), nVersion(nVersionIn) {}
- CHashWriter& write(const char *pch, size_t size) {
+ void write(const char *pch, size_t size) {
ctx.Write((const unsigned char*)pch, size);
- return (*this);
}
// invalidates the object