mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
refactor: resolve cppcheck warnings (#4799)
This commit is contained in:
parent
407873e024
commit
2fe55acb4c
@ -102,7 +102,7 @@ CBLSPublicKey CQuorum::GetPubKeyShare(size_t memberIdx) const
|
||||
if (!HasVerificationVector() || memberIdx >= members.size() || !qc->validMembers[memberIdx]) {
|
||||
return CBLSPublicKey();
|
||||
}
|
||||
auto& m = members[memberIdx];
|
||||
const auto& m = members[memberIdx];
|
||||
return blsCache.BuildPubKeyShare(m->proTxHash, quorumVvec, CBLSId(m->proTxHash));
|
||||
}
|
||||
|
||||
@ -433,7 +433,6 @@ std::vector<CQuorumCPtr> CQuorumManager::ScanQuorums(Consensus::LLMQType llmqTyp
|
||||
return {};
|
||||
}
|
||||
|
||||
bool fCacheExists{false};
|
||||
const CBlockIndex* pIndexScanCommitments{pindexStart};
|
||||
size_t nScanCommitments{nCountRequested};
|
||||
std::vector<CQuorumCPtr> vecResultQuorums;
|
||||
@ -463,7 +462,7 @@ std::vector<CQuorumCPtr> CQuorumManager::ScanQuorums(Consensus::LLMQType llmqTyp
|
||||
}
|
||||
|
||||
size_t nCountResult{vecResultQuorums.size()};
|
||||
if (nCountResult > 0 && !fCacheExists) {
|
||||
if (nCountResult > 0) {
|
||||
LOCK(quorumsCacheCs);
|
||||
// Don't cache more than cache.max_size() elements
|
||||
auto& cache = scanQuorumsCache[llmqType];
|
||||
|
@ -22,7 +22,7 @@
|
||||
/// Proposal wrapper
|
||||
///
|
||||
|
||||
Proposal::Proposal(const CGovernanceObject _govObj, QObject* parent) :
|
||||
Proposal::Proposal(const CGovernanceObject& _govObj, QObject* parent) :
|
||||
QObject(parent),
|
||||
govObj(_govObj)
|
||||
{
|
||||
|
@ -63,7 +63,7 @@ private:
|
||||
QString m_url;
|
||||
|
||||
public:
|
||||
explicit Proposal(const CGovernanceObject _govObj, QObject* parent = nullptr);
|
||||
explicit Proposal(const CGovernanceObject& _govObj, QObject* parent = nullptr);
|
||||
QString title() const;
|
||||
QString hash() const;
|
||||
QDateTime startDate() const;
|
||||
|
Loading…
Reference in New Issue
Block a user