Fixed clang-tidy warnings
This commit is contained in:
@@ -58,7 +58,6 @@ void find_translation_units_for_diagrams(
|
||||
}
|
||||
|
||||
void render_diagram(const clanguml::common::generator_type_t generator_type,
|
||||
const std::string &output_directory,
|
||||
std::shared_ptr<config::diagram> diagram_config)
|
||||
{
|
||||
std::string cmd;
|
||||
@@ -162,8 +161,7 @@ void generate_diagram_impl(const std::string &name,
|
||||
}
|
||||
|
||||
if (runtime_config.render_diagrams) {
|
||||
render_diagram(
|
||||
generator_type, runtime_config.output_directory, diagram);
|
||||
render_diagram(generator_type, diagram);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ inja::json generator<C, D>::element_context(const E &e) const
|
||||
ctx["element"]["source"]["line"] = e.line();
|
||||
}
|
||||
|
||||
const auto maybe_comment = e.comment();
|
||||
const auto &maybe_comment = e.comment();
|
||||
if (maybe_comment) {
|
||||
ctx["element"]["comment"] = maybe_comment.value();
|
||||
}
|
||||
|
||||
@@ -670,7 +670,7 @@ void context_filter::initialize(const diagram &d) const
|
||||
|
||||
// Prepare effective_contexts_
|
||||
for (auto i = 0U; i < context_.size(); i++) {
|
||||
effective_contexts_.push_back({});
|
||||
effective_contexts_.push_back({}); // NOLINT
|
||||
initialize_effective_context(d, i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ void generator::generate_message_comment(
|
||||
if (comment_generated_from_note_decorators)
|
||||
return;
|
||||
|
||||
if (auto &cmt = m.comment();
|
||||
if (const auto &cmt = m.comment();
|
||||
config().generate_message_comments() && cmt.has_value()) {
|
||||
|
||||
ostr << indent(1) << "note over " << generate_alias(from.value())
|
||||
|
||||
Reference in New Issue
Block a user