diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-09-23 20:48:44 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2022-03-24 14:30:13 +0100 |
commit | f4bc4a705addea3e60c3b69437913e6571df275d (patch) | |
tree | de8f7064228170e52d0520cf16eeca3ae285a782 /src/rpc/util.h | |
parent | 4a0ab355b3e7e7a3fae218fb5d9894fb7f3636a5 (diff) |
rpc: Add m_skip_type_check to RPCResult
Used in the next commit.
Diffstat (limited to 'src/rpc/util.h')
-rw-r--r-- | src/rpc/util.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/rpc/util.h b/src/rpc/util.h index 89d32d4193..e16fed75bc 100644 --- a/src/rpc/util.h +++ b/src/rpc/util.h @@ -256,6 +256,7 @@ struct RPCResult { const std::string m_key_name; //!< Only used for dicts const std::vector<RPCResult> m_inner; //!< Only used for arrays or dicts const bool m_optional; + const bool m_skip_type_check; const std::string m_description; const std::string m_cond; @@ -270,6 +271,7 @@ struct RPCResult { m_key_name{std::move(m_key_name)}, m_inner{std::move(inner)}, m_optional{optional}, + m_skip_type_check{false}, m_description{std::move(description)}, m_cond{std::move(cond)} { @@ -290,11 +292,13 @@ struct RPCResult { const std::string m_key_name, const bool optional, const std::string description, - const std::vector<RPCResult> inner = {}) + const std::vector<RPCResult> inner = {}, + bool skip_type_check = false) : m_type{std::move(type)}, m_key_name{std::move(m_key_name)}, m_inner{std::move(inner)}, m_optional{optional}, + m_skip_type_check{skip_type_check}, m_description{std::move(description)}, m_cond{} { @@ -305,8 +309,9 @@ struct RPCResult { const Type type, const std::string m_key_name, const std::string description, - const std::vector<RPCResult> inner = {}) - : RPCResult{type, m_key_name, false, description, inner} {} + const std::vector<RPCResult> inner = {}, + bool skip_type_check = false) + : RPCResult{type, m_key_name, false, description, inner, skip_type_check} {} /** Append the sections of the result. */ void ToSections(Sections& sections, OuterType outer_type = OuterType::NONE, const int current_indent = 0) const; |