aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/util.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-01-01 15:02:49 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-01-01 15:08:07 +0100
commitfa749fbea3cad64582f76f7a58cfcc0d91a97326 (patch)
tree369145c8f60aafc266cb64a768fd29a7e79784d0 /src/rpc/util.cpp
parente75f91eae3936269b40b4bfdfe540d5526270936 (diff)
downloadbitcoin-fa749fbea3cad64582f76f7a58cfcc0d91a97326.tar.xz
rpc: Replace boost::variant with std::variant for RPCArg.m_fallback
Diffstat (limited to 'src/rpc/util.cpp')
-rw-r--r--src/rpc/util.cpp12
1 files changed, 6 insertions, 6 deletions
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<RPCArg::Optional>(m_fallback);
+ return RPCArg::Optional::NO != std::get<RPCArg::Optional>(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<std::string>(m_fallback);
+ if (m_fallback.index() == 1) {
+ ret += ", optional, default=" + std::get<std::string>(m_fallback);
} else {
- switch (boost::get<RPCArg::Optional>(m_fallback)) {
+ switch (std::get<RPCArg::Optional>(m_fallback)) {
case RPCArg::Optional::OMITTED: {
// nothing to do. Element is treated as if not present and has no default value
break;