mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 05:32:22 +02:00
rpc: avoid moving RPC enum types
`RPCArg::Type` and `RPCResult::Type` are enum values, so moving them in constructors is no different from copying them. Initialize the stored type fields directly.
This commit is contained in:
@@ -236,7 +236,7 @@ struct RPCArg {
|
||||
std::string description,
|
||||
RPCArgOptions opts = {})
|
||||
: m_names{std::move(name)},
|
||||
m_type{std::move(type)},
|
||||
m_type{type},
|
||||
m_fallback{std::move(fallback)},
|
||||
m_description{std::move(description)},
|
||||
m_opts{std::move(opts)}
|
||||
@@ -252,7 +252,7 @@ struct RPCArg {
|
||||
std::vector<RPCArg> inner,
|
||||
RPCArgOptions opts = {})
|
||||
: m_names{std::move(name)},
|
||||
m_type{std::move(type)},
|
||||
m_type{type},
|
||||
m_inner{std::move(inner)},
|
||||
m_fallback{std::move(fallback)},
|
||||
m_description{std::move(description)},
|
||||
@@ -338,7 +338,7 @@ struct RPCResult {
|
||||
std::string description,
|
||||
std::vector<RPCResult> inner = {},
|
||||
RPCResultOptions opts = {})
|
||||
: m_type{std::move(type)},
|
||||
: m_type{type},
|
||||
m_key_name{std::move(m_key_name)},
|
||||
m_inner{std::move(inner)},
|
||||
m_optional{optional},
|
||||
@@ -366,7 +366,7 @@ struct RPCResult {
|
||||
std::string description,
|
||||
std::vector<RPCResult> inner = {},
|
||||
RPCResultOptions opts = {})
|
||||
: m_type{std::move(type)},
|
||||
: m_type{type},
|
||||
m_key_name{std::move(m_key_name)},
|
||||
m_inner{std::move(inner)},
|
||||
m_optional{optional},
|
||||
|
||||
Reference in New Issue
Block a user