Skip to content
Permalink
Browse files

Remove 'boost::optional'-related gcc warnings

  • Loading branch information...
hebasto committed Jan 30, 2019
1 parent 72ca72e commit a1d9961c0b79f28029f7121fd5ebd982f8c72952
Showing with 7 additions and 2 deletions.
  1. +4 −1 src/wallet/rpcwallet.cpp
  2. +3 −1 src/wallet/wallet.cpp
@@ -41,6 +41,8 @@


#include <functional> #include <functional>


#include <boost/optional/optional.hpp>

static const std::string WALLET_ENDPOINT_BASE = "/wallet/"; static const std::string WALLET_ENDPOINT_BASE = "/wallet/";


bool GetWalletNameFromJSONRPCRequest(const JSONRPCRequest& request, std::string& wallet_name) bool GetWalletNameFromJSONRPCRequest(const JSONRPCRequest& request, std::string& wallet_name)
@@ -1591,7 +1593,8 @@ static UniValue listsinceblock(const JSONRPCRequest& request)
auto locked_chain = pwallet->chain().lock(); auto locked_chain = pwallet->chain().lock();
LOCK(pwallet->cs_wallet); LOCK(pwallet->cs_wallet);


Optional<int> height; // Height of the specified block or the common ancestor, if the block provided was in a deactivated chain. // The way the 'height' is initialized is just a workaround for the gcc bug #47679 since version 4.6.0.
auto height = boost::make_optional(false, 0); // Height of the specified block or the common ancestor, if the block provided was in a deactivated chain.
Optional<int> altheight; // Height of the specified block, even if it's in a deactivated chain. Optional<int> altheight; // Height of the specified block, even if it's in a deactivated chain.
int target_confirms = 1; int target_confirms = 1;
isminefilter filter = ISMINE_SPENDABLE; isminefilter filter = ISMINE_SPENDABLE;
@@ -35,6 +35,7 @@
#include <future> #include <future>


#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
#include <boost/optional/optional.hpp>


static const size_t OUTPUT_GROUP_MAX_ENTRIES = 10; static const size_t OUTPUT_GROUP_MAX_ENTRIES = 10;


@@ -1642,7 +1643,8 @@ CWallet::ScanResult CWallet::ScanForWalletTransactions(const uint256& start_bloc
fAbortRescan = false; fAbortRescan = false;
ShowProgress(strprintf("%s " + _("Rescanning..."), GetDisplayName()), 0); // show rescan progress in GUI as dialog or on splashscreen, if -rescan on startup ShowProgress(strprintf("%s " + _("Rescanning..."), GetDisplayName()), 0); // show rescan progress in GUI as dialog or on splashscreen, if -rescan on startup
uint256 tip_hash; uint256 tip_hash;
Optional<int> block_height; // The way the 'block_height' is initialized is just a workaround for the gcc bug #47679 since version 4.6.0.
auto block_height = boost::make_optional(false, 0);
double progress_begin; double progress_begin;
double progress_end; double progress_end;
{ {

0 comments on commit a1d9961

Please sign in to comment.
You can’t perform that action at this time.