From 84cbc07fd51c1dfcc8569ffa091f52be70b6d335 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 28 Apr 2026 04:30:48 +0000 Subject: [PATCH] Fix daemon compile errors --- src/httpserver.cpp | 1 + src/masternode-budget.h | 22 ++++++++++++---------- src/miner.h | 6 +++--- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 0ddaa439..eadc7b4a 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include diff --git a/src/masternode-budget.h b/src/masternode-budget.h index 3c909927..05aa7638 100644 --- a/src/masternode-budget.h +++ b/src/masternode-budget.h @@ -16,10 +16,10 @@ #include "sync.h" #include "util.h" #include -#include -#include +#include +#include #include -#include +#include extern CCriticalSection cs_budget; class CBudgetManager; @@ -416,7 +416,7 @@ public: CFinalizedBudgetBroadcast(const CFinalizedBudget& other); CFinalizedBudgetBroadcast(std::string strBudgetNameIn, int nBlockStartIn, std::vector vecBudgetPaymentsIn, uint256 nFeeTXHashIn); - void std::swap(CFinalizedBudgetBroadcast& first, CFinalizedBudgetBroadcast& second) // nothrow + friend void swap(CFinalizedBudgetBroadcast& first, CFinalizedBudgetBroadcast& second) // nothrow { // enable ADL (not necessary in our case, but good practice) using std::swap; @@ -425,15 +425,16 @@ public: // the two classes are effectively swapped std::swap(first.strBudgetName, second.strBudgetName); std::swap(first.nBlockStart, second.nBlockStart); - first.mapVotes.std::swap(second.mapVotes); - first.vecBudgetPayments.std::swap(second.vecBudgetPayments); + first.mapVotes.swap(second.mapVotes); + first.vecBudgetPayments.swap(second.vecBudgetPayments); std::swap(first.nFeeTXHash, second.nFeeTXHash); std::swap(first.nTime, second.nTime); } CFinalizedBudgetBroadcast& operator=(CFinalizedBudgetBroadcast from) { - std::swap(*this, from); + using std::swap; + swap(*this, from); return *this; } @@ -562,7 +563,7 @@ public: CBudgetProposalBroadcast(const CBudgetProposalBroadcast& other) : CBudgetProposal(other) {} CBudgetProposalBroadcast(std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn, uint256 nFeeTXHashIn); - void std::swap(CBudgetProposalBroadcast& first, CBudgetProposalBroadcast& second) // nothrow + friend void swap(CBudgetProposalBroadcast& first, CBudgetProposalBroadcast& second) // nothrow { // enable ADL (not necessary in our case, but good practice) using std::swap; @@ -577,12 +578,13 @@ public: std::swap(first.address, second.address); std::swap(first.nTime, second.nTime); std::swap(first.nFeeTXHash, second.nFeeTXHash); - first.mapVotes.std::swap(second.mapVotes); + first.mapVotes.swap(second.mapVotes); } CBudgetProposalBroadcast& operator=(CBudgetProposalBroadcast from) { - std::swap(*this, from); + using std::swap; + swap(*this, from); return *this; } diff --git a/src/miner.h b/src/miner.h index 162b5b2a..66ff2a15 100644 --- a/src/miner.h +++ b/src/miner.h @@ -7,10 +7,10 @@ #ifndef AGRARIAN_BITCOIN_MINER_H #define AGRARIAN_BITCOIN_MINER_H #include -#include -#include #include +#include #include +#include class CBlock; class CBlockHeader; class CBlockIndex; @@ -35,4 +35,4 @@ void BitcoinMiner(CWallet* pwallet, bool fProofOfStake); extern double dHashesPerSec; extern int64_t nHPSTimerStart; -#endif // AGRARIAN_BITCOIN_MINER_H \ No newline at end of file +#endif // AGRARIAN_BITCOIN_MINER_H