rpc: Treat all args after a hidden arg as hidden as well

This commit has no effect right now, but hardens the code for the future
pull/764/head
MarcoFalke 4 years ago
parent a78742830a
commit fa459bdc87
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

@ -504,7 +504,7 @@ std::string RPCHelpMan::ToString() const
ret += m_name;
bool was_optional{false};
for (const auto& arg : m_args) {
if (arg.m_hidden) continue;
if (arg.m_hidden) break; // Any arg that follows is also hidden
const bool optional = arg.IsOptional();
ret += " ";
if (optional) {
@ -526,7 +526,7 @@ std::string RPCHelpMan::ToString() const
Sections sections;
for (size_t i{0}; i < m_args.size(); ++i) {
const auto& arg = m_args.at(i);
if (arg.m_hidden) continue;
if (arg.m_hidden) break; // Any arg that follows is also hidden
if (i == 0) ret += "\nArguments:\n";

Loading…
Cancel
Save