silence unused variable error for if constexpr

This commit is contained in:
Sean Darcy 2022-09-26 14:58:46 +10:00 committed by Jason Rhinelander
parent 9d093f1c5a
commit 23dc129dc7
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262
1 changed files with 1 additions and 1 deletions

View File

@ -548,7 +548,7 @@ namespace cryptonote::rpc {
// a single one we want just the value itself; this does that. Returns a reference to the
// assigned value (whether as a top-level value or array element).
template <typename T>
json& set(const std::string& key, T&& value, bool binary = is_binary_parameter<T> || is_binary_container<T>) {
json& set(const std::string& key, T&& value, [[maybe_unused]] bool binary = is_binary_parameter<T> || is_binary_container<T>) {
auto* x = &entry[key];
if (!x->is_null() && !x->is_array())
x = &(entry[key] = json::array({std::move(*x)}));