From d54ff90bc0aa7a12eb11123b5c31b0098c23fef0 Mon Sep 17 00:00:00 2001 From: timemarkovqtum Date: Thu, 4 Apr 2024 14:41:24 +0200 Subject: [PATCH] Fix Wdeprecated-copy warning in primitives block --- src/primitives/block.h | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/src/primitives/block.h b/src/primitives/block.h index b294417248..bdcee117bf 100644 --- a/src/primitives/block.h +++ b/src/primitives/block.h @@ -38,7 +38,6 @@ class CBlockHeader { SetNull(); } - virtual ~CBlockHeader(){}; SERIALIZE_METHODS(CBlockHeader, obj) { READWRITE(obj.nVersion, obj.hashPrevBlock, obj.hashMerkleRoot, obj.nTime, obj.nBits, obj.nNonce, obj.hashStateRoot, obj.hashUTXORoot, obj.prevoutStake, obj.vchBlockSigDlgt); } @@ -78,17 +77,17 @@ class CBlockHeader } // ppcoin: two types of block: proof-of-work or proof-of-stake - virtual bool IsProofOfStake() const //qtum + bool IsProofOfStake() const //qtum { return !prevoutStake.IsNull(); } - virtual bool IsProofOfWork() const + bool IsProofOfWork() const { return !IsProofOfStake(); } - virtual uint32_t StakeTime() const + uint32_t StakeTime() const { uint32_t ret = 0; if(IsProofOfStake()) @@ -105,24 +104,6 @@ class CBlockHeader std::vector GetProofOfDelegation() const; bool HasProofOfDelegation() const; - - CBlockHeader& operator=(const CBlockHeader& other) //qtum - { - if (this != &other) - { - this->nVersion = other.nVersion; - this->hashPrevBlock = other.hashPrevBlock; - this->hashMerkleRoot = other.hashMerkleRoot; - this->nTime = other.nTime; - this->nBits = other.nBits; - this->nNonce = other.nNonce; - this->hashStateRoot = other.hashStateRoot; - this->hashUTXORoot = other.hashUTXORoot; - this->vchBlockSigDlgt = other.vchBlockSigDlgt; - this->prevoutStake = other.prevoutStake; - } - return *this; - } };