From c608bbec1dea435ab460bf861c7c06d828832c22 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 11 Aug 2017 21:50:57 +0300 Subject: [PATCH] Pass reference when calling HasPayeeWithVotes (#1569) --- src/masternode-payments.cpp | 2 +- src/masternode-payments.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp index 918009fc1..a86e13dbb 100644 --- a/src/masternode-payments.cpp +++ b/src/masternode-payments.cpp @@ -528,7 +528,7 @@ bool CMasternodeBlockPayees::GetBestPayee(CScript& payeeRet) return (nVotes > -1); } -bool CMasternodeBlockPayees::HasPayeeWithVotes(CScript payeeIn, int nVotesReq) +bool CMasternodeBlockPayees::HasPayeeWithVotes(const CScript& payeeIn, int nVotesReq) { LOCK(cs_vecPayees); diff --git a/src/masternode-payments.h b/src/masternode-payments.h index 9248e8dfe..b4d291418 100644 --- a/src/masternode-payments.h +++ b/src/masternode-payments.h @@ -98,7 +98,7 @@ public: void AddPayee(const CMasternodePaymentVote& vote); bool GetBestPayee(CScript& payeeRet); - bool HasPayeeWithVotes(CScript payeeIn, int nVotesReq); + bool HasPayeeWithVotes(const CScript& payeeIn, int nVotesReq); bool IsTransactionValid(const CTransaction& txNew);