diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-05-11 09:59:32 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-05-11 09:53:49 -0400 |
commit | fa182a8794cbf9be1aa91d1d75e65bc7800156bc (patch) | |
tree | 8515a7e25084c508d014397baa62413dd582db79 /src/wallet/rpcwallet.cpp | |
parent | 88d8b4e182bfc75e8496f7046af7aab93307b9d0 (diff) |
rpcwallet: Replace boost::optional<T>::emplace with simple assignment of T{}
Optional::emplace() was only added in boost 1.56, see
https://github.com/boostorg/optional/commit/2e583aaf30964afd66c1284aa71d0d8b42fa440d
To simply work around https://github.com/bitcoin/bitcoin/issues/18943,
replace it with assignment of T{}
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r-- | src/wallet/rpcwallet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index dda00f1fe7..fcf78bd4b4 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -1557,8 +1557,8 @@ static UniValue listsinceblock(const JSONRPCRequest& request) uint256 blockId; if (!request.params[0].isNull() && !request.params[0].get_str().empty()) { blockId = ParseHashV(request.params[0], "blockhash"); - height.emplace(); - altheight.emplace(); + height = int{}; + altheight = int{}; if (!pwallet->chain().findCommonAncestor(blockId, pwallet->GetLastBlockHash(), /* ancestor out */ FoundBlock().height(*height), /* blockId out */ FoundBlock().height(*altheight))) { throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found"); } |