From f3ef592f01a895572613733e9dd45f2f10fccc15 Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Tue, 17 Jan 2023 00:14:43 +0100 Subject: [PATCH] Fixed clang-tidy warnings --- src/decorators/decorators.cc | 2 +- src/util/util.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/decorators/decorators.cc b/src/decorators/decorators.cc index 0b112e9d..8e062353 100644 --- a/src/decorators/decorators.cc +++ b/src/decorators/decorators.cc @@ -62,7 +62,7 @@ decorator_toks decorator::tokenize(const std::string &label, std::string_view c) decorator_toks res; res.label = label; size_t pos{}; - auto it = c.begin(); + const auto *it = c.begin(); std::advance(it, label.size()); if (*it == ':') { diff --git a/src/util/util.cc b/src/util/util.cc index 6029f845..e41644df 100644 --- a/src/util/util.cc +++ b/src/util/util.cc @@ -327,8 +327,8 @@ std::string path_to_url(const std::filesystem::path &p) if (p.has_root_directory()) return fmt::format("/{}", fmt::join(path_tokens, "/")); - else - return fmt::format("{}", fmt::join(path_tokens, "/")); + + return fmt::format("{}", fmt::join(path_tokens, "/")); } } // namespace clanguml::util