Skip to content

Commit

Permalink
Remove unnecessary const_cast
Browse files Browse the repository at this point in the history
Signed-off-by: Julian Fleischer <julian@thirdhash.com>
  • Loading branch information
scravy committed Feb 12, 2019
1 parent ea022d9 commit 5039e4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4347,7 +4347,7 @@ bool CChainState::LoadGenesisBlock(const CChainParams& chainparams)
return true;

try {
CBlock &block = const_cast<CBlock&>(chainparams.GenesisBlock());
const CBlock& block = chainparams.GenesisBlock();
CDiskBlockPos blockPos = SaveBlockToDisk(block, 0, chainparams, nullptr);
if (blockPos.IsNull())
return error("%s: writing genesis block to disk failed", __func__);
Expand Down

0 comments on commit 5039e4b

Please sign in to comment.