From fa749fbea3cad64582f76f7a58cfcc0d91a97326 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 1 Jan 2021 15:02:49 +0100 Subject: rpc: Replace boost::variant with std::variant for RPCArg.m_fallback --- src/rpc/util.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/rpc/util.cpp') diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp index 1b21587b6d..e377a80fbd 100644 --- a/src/rpc/util.cpp +++ b/src/rpc/util.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020 The Bitcoin Core developers +// Copyright (c) 2017-2021 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -562,10 +562,10 @@ std::string RPCArg::GetName() const bool RPCArg::IsOptional() const { - if (m_fallback.which() == 1) { + if (m_fallback.index() == 1) { return true; } else { - return RPCArg::Optional::NO != boost::get(m_fallback); + return RPCArg::Optional::NO != std::get(m_fallback); } } @@ -609,10 +609,10 @@ std::string RPCArg::ToDescriptionString() const } } // no default case, so the compiler can warn about missing cases } - if (m_fallback.which() == 1) { - ret += ", optional, default=" + boost::get(m_fallback); + if (m_fallback.index() == 1) { + ret += ", optional, default=" + std::get(m_fallback); } else { - switch (boost::get(m_fallback)) { + switch (std::get(m_fallback)) { case RPCArg::Optional::OMITTED: { // nothing to do. Element is treated as if not present and has no default value break; -- cgit v1.2.3