Fixed clang-tidy warnings

This commit is contained in:
Bartek Kryza
2023-03-25 22:49:47 +01:00
parent 90307793d8
commit fc3110fd4e
9 changed files with 44 additions and 42 deletions

View File

@@ -54,12 +54,12 @@ void to_json(nlohmann::json &j, const element &c)
void to_json(nlohmann::json &j, const template_parameter &c)
{
j["kind"] = to_string(c.kind());
if (c.type())
j["type"] = c.type().value();
if (c.name())
j["name"] = c.name().value();
if (c.default_value())
j["default"] = c.default_value().value();
if (const auto &t = c.type(); t)
j["type"] = t.value();
if (const auto &n = c.name(); n)
j["name"] = n.value();
if (const auto &d = c.default_value(); d)
j["default"] = d.value();
j["is_variadic"] = c.is_variadic();
j["template_parameters"] = c.template_params();
}