From 70e70888231938ba5310a8e0e28b9351beba21ef Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Wed, 13 Sep 2023 17:17:48 +0200 Subject: [PATCH] Fixed clang-tidy warnings --- .../generators/mermaid/class_diagram_generator.cc | 8 ++++---- src/common/generators/mermaid/generator.cc | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/class_diagram/generators/mermaid/class_diagram_generator.cc b/src/class_diagram/generators/mermaid/class_diagram_generator.cc index f1cf57fd..0b115042 100644 --- a/src/class_diagram/generators/mermaid/class_diagram_generator.cc +++ b/src/class_diagram/generators/mermaid/class_diagram_generator.cc @@ -240,16 +240,16 @@ void generator::generate_method( std::vector method_mods; if (m.is_defaulted()) { - method_mods.push_back("default"); + method_mods.emplace_back("default"); } if (m.is_const()) { - method_mods.push_back("const"); + method_mods.emplace_back("const"); } if (m.is_constexpr()) { - method_mods.push_back("constexpr"); + method_mods.emplace_back("constexpr"); } if (m.is_consteval()) { - method_mods.push_back("consteval"); + method_mods.emplace_back("consteval"); } if (!method_mods.empty()) { diff --git a/src/common/generators/mermaid/generator.cc b/src/common/generators/mermaid/generator.cc index f7b270c4..355995d4 100644 --- a/src/common/generators/mermaid/generator.cc +++ b/src/common/generators/mermaid/generator.cc @@ -74,8 +74,8 @@ std::string to_mermaid(message_t r) std::string indent(const unsigned level) { - const auto kIndentWidth = 4U; - return std::string(level * kIndentWidth, ' '); + const auto kIndentWidth = 4UL; + return std::string(level * kIndentWidth, ' '); // NOLINT } std::string render_name(std::string name)