diff options
Diffstat (limited to 'src/primitives/block.h')
-rw-r--r-- | src/primitives/block.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/primitives/block.h b/src/primitives/block.h index 4957958c6a..5d6d44ac76 100644 --- a/src/primitives/block.h +++ b/src/primitives/block.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2016 The Bitcoin Core developers +// Copyright (c) 2009-2017 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -86,14 +86,14 @@ public: CBlock(const CBlockHeader &header) { SetNull(); - *((CBlockHeader*)this) = header; + *(static_cast<CBlockHeader*>(this)) = header; } ADD_SERIALIZE_METHODS; template <typename Stream, typename Operation> inline void SerializationOp(Stream& s, Operation ser_action) { - READWRITE(*(CBlockHeader*)this); + READWRITE(*static_cast<CBlockHeader*>(this)); READWRITE(vtx); } |