File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -678,11 +678,13 @@ static void CheckRequiredOrDefault(const RPCArg& param)
678678 void force_semicolon (ret_type)
679679
680680// Optional arg (without default). Can also be called on required args, if needed.
681+ TMPL_INST(nullptr , const UniValue*, maybe_arg;);
681682TMPL_INST (nullptr , std::optional<double >, maybe_arg ? std::optional{maybe_arg->get_real ()} : std::nullopt ;);
682683TMPL_INST (nullptr , std::optional<bool >, maybe_arg ? std::optional{maybe_arg->get_bool ()} : std::nullopt ;);
683684TMPL_INST (nullptr , const std::string*, maybe_arg ? &maybe_arg->get_str () : nullptr;);
684685
685686// Required arg or optional arg with default value.
687+ TMPL_INST (CheckRequiredOrDefault, const UniValue&, *CHECK_NONFATAL (maybe_arg););
686688TMPL_INST (CheckRequiredOrDefault, bool , CHECK_NONFATAL(maybe_arg)->get_bool(););
687689TMPL_INST (CheckRequiredOrDefault, int , CHECK_NONFATAL(maybe_arg)->getInt<int>(););
688690TMPL_INST (CheckRequiredOrDefault, uint64_t , CHECK_NONFATAL(maybe_arg)->getInt<uint64_t>(););
You can’t perform that action at this time.
0 commit comments