From 4c7c9ff7dcfe2dfd67a8c38801a9367aefca55f1 Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Fri, 23 Dec 2022 16:59:33 +0100 Subject: [PATCH] Applied llvm-else-after-return clang-tidy fixes --- src/config/config.cc | 2 +- src/decorators/decorators.cc | 2 +- src/sequence_diagram/model/participant.cc | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/config/config.cc b/src/config/config.cc index d9f5a96d..16c45b76 100644 --- a/src/config/config.cc +++ b/src/config/config.cc @@ -311,7 +311,7 @@ std::shared_ptr parse_diagram_config(const Node &d) if (diagram_type == "sequence") { return std::make_shared(d.as()); } - else if (diagram_type == "package") { + if (diagram_type == "package") { return std::make_shared(d.as()); } else if (diagram_type == "include") { diff --git a/src/decorators/decorators.cc b/src/decorators/decorators.cc index 0e3f96e9..a31b1dfd 100644 --- a/src/decorators/decorators.cc +++ b/src/decorators/decorators.cc @@ -32,7 +32,7 @@ std::shared_ptr decorator::from_string(std::string_view c) if (c.find(skip_relationship::label) == 0) { return skip_relationship::from_string(c); } - else if (c.find(skip::label) == 0) { + if (c.find(skip::label) == 0) { return skip::from_string(c); } else if (c.find(style::label) == 0) { diff --git a/src/sequence_diagram/model/participant.cc b/src/sequence_diagram/model/participant.cc index 71829625..e941330d 100644 --- a/src/sequence_diagram/model/participant.cc +++ b/src/sequence_diagram/model/participant.cc @@ -198,7 +198,7 @@ std::string function::message_name(message_render_mode mode) const if (mode == message_render_mode::no_arguments) { return fmt::format("{}(){}", name(), is_const() ? " const" : ""); } - else if (mode == message_render_mode::abbreviated) { + if (mode == message_render_mode::abbreviated) { return fmt::format("{}({}){}", name(), clanguml::util::abbreviate( fmt::format("{}", fmt::join(parameters_, ",")), @@ -270,7 +270,7 @@ std::string method::message_name(message_render_mode mode) const return fmt::format("{}{}(){}{}", style, method_name(), is_const() ? " const" : "", style); } - else if (mode == message_render_mode::abbreviated) { + if (mode == message_render_mode::abbreviated) { return fmt::format("{}({}){}", name(), clanguml::util::abbreviate( fmt::format("{}", fmt::join(parameters(), ",")), @@ -350,7 +350,7 @@ std::string function_template::message_name(message_render_mode mode) const return fmt::format( "{}{}(){}", name(), template_params, is_const() ? " const" : ""); } - else if (mode == message_render_mode::abbreviated) { + if (mode == message_render_mode::abbreviated) { return fmt::format("{}({}){}", name(), clanguml::util::abbreviate( fmt::format("{}", fmt::join(parameters(), ",")),