From 9002dbbe856b1d82970e4c1b7f5efe478d871479 Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Sat, 17 Aug 2024 03:30:16 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20gucc:=20apply=20clang-format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gucc/src/cpu.cpp | 2 +- gucc/src/initcpio.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gucc/src/cpu.cpp b/gucc/src/cpu.cpp index 55b3c9f..9279bd6 100644 --- a/gucc/src/cpu.cpp +++ b/gucc/src/cpu.cpp @@ -116,7 +116,7 @@ auto get_isa_levels() noexcept -> std::vector { std::vector supported_isa_levels; { - struct utsname un { }; + struct utsname un{}; uname(&un); supported_isa_levels.emplace_back(un.machine); } diff --git a/gucc/src/initcpio.cpp b/gucc/src/initcpio.cpp index 6761d7f..4037643 100644 --- a/gucc/src/initcpio.cpp +++ b/gucc/src/initcpio.cpp @@ -26,7 +26,6 @@ constexpr auto modify_initcpio_line(std::string_view line, std::string_view modu constexpr auto modify_initcpio_fields(std::string_view file_content, std::string_view modules, std::string_view files, std::string_view hooks) noexcept -> std::string { return file_content | std::ranges::views::split('\n') | std::ranges::views::transform([&](auto&& rng) { - /* clang-format off */ auto&& line = std::string_view(&*rng.begin(), static_cast(std::ranges::distance(rng))); return modify_initcpio_line(line, modules, files, hooks); }) @@ -45,8 +44,8 @@ bool Initcpio::write() const noexcept { return false; } const auto& formatted_modules = utils::join(modules, ' '); - const auto& formatted_files = utils::join(files, ' '); - const auto& formatted_hooks = utils::join(hooks, ' '); + const auto& formatted_files = utils::join(files, ' '); + const auto& formatted_hooks = utils::join(hooks, ' '); auto result = modify_initcpio_fields(file_content, formatted_modules, formatted_files, formatted_hooks); return file_utils::create_file_for_overwrite(m_file_path, result);