From 9b7504cb32505bdcff437d61ea08ebf09ff10b62 Mon Sep 17 00:00:00 2001 From: Evan Duffield Date: Fri, 6 May 2016 18:36:11 -0400 Subject: [PATCH] Fix dumb errors on ubuntu --- src/compat/endian.h | 16 +++++++++------- src/governance.cpp | 3 ++- src/rpcmasternode-budget.cpp | 4 ++-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/compat/endian.h b/src/compat/endian.h index 05a40eba2d..5bd84a24f7 100644 --- a/src/compat/endian.h +++ b/src/compat/endian.h @@ -108,31 +108,33 @@ inline uint64_t le64toh(uint64_t little_endian_64bits) #else // WORDS_BIGENDIAN #if HAVE_DECL_HTOBE16 == 0 -inline uint16_t htobe16(uint16_t host_16bits) +/*inline uint16_t htobe16(uint16_t host_16bits) { return bswap_16(host_16bits); -} +} */ #endif // HAVE_DECL_HTOBE16 #if HAVE_DECL_HTOLE16 == 0 -inline uint16_t htole16(uint16_t host_16bits) +/*inline uint16_t htole16(uint16_t host_16bits) { return host_16bits; -} +} */ #endif // HAVE_DECL_HTOLE16 #if HAVE_DECL_BE16TOH == 0 +/* inline uint16_t be16toh(uint16_t big_endian_16bits) { return bswap_16(big_endian_16bits); -} +} */ #endif // HAVE_DECL_BE16TOH #if HAVE_DECL_LE16TOH == 0 -inline uint16_t le16toh(uint16_t little_endian_16bits) +/* +inlineuint16_t le16toh(uint16_t little_endian_16bits) { return little_endian_16bits; -} + } */ #endif // HAVE_DECL_LE16TOH #if HAVE_DECL_HTOBE32 == 0 diff --git a/src/governance.cpp b/src/governance.cpp index 3f589e525b..0fa27c8895 100644 --- a/src/governance.cpp +++ b/src/governance.cpp @@ -329,7 +329,8 @@ void CGovernanceManager::ProcessMessage(CNode* pfrom, std::string& strCommand, C int nConf = 0; if(!IsCollateralValid(budgetProposalBroadcast.nFeeTXHash, budgetProposalBroadcast.GetHash(), strError, budgetProposalBroadcast.nTime, nConf, GOVERNANCE_FEE_TX)){ LogPrintf("Proposal FeeTX is not valid - %s - %s\n", budgetProposalBroadcast.nFeeTXHash.ToString(), strError); - if(nConf >= 1) vecImmatureBudgetProposals.push_back(budgetProposalBroadcast); + //todo 12.1 + //if(nConf >= 1) vecImmatureBudgetProposals.push_back(budgetProposalBroadcast); return; } diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp index bfdde337a9..1f824e0495 100644 --- a/src/rpcmasternode-budget.cpp +++ b/src/rpcmasternode-budget.cpp @@ -46,7 +46,7 @@ int ConvertVoteOutcome(std::string strVoteOutcome) // convert custom sentinel outcomes to integer and store try { - int i = std::stoi(strVoteOutcome); + int i = boost::lexical_cast(strVoteOutcome); if(i < VOTE_ACTION_CUSTOM_START || i > VOTE_ACTION_CUSTOM_END) return -1; return i; } @@ -467,4 +467,4 @@ UniValue voteraw(const UniValue& params, bool fHelp) } else { throw JSONRPCError(RPC_INTERNAL_ERROR, "Error voting : " + strError); } -} \ No newline at end of file +}