Skip to content

Commit

Permalink
🧹 gucc: apply clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
vnepogodin committed Aug 16, 2024
1 parent 493c543 commit 9002dbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gucc/src/cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ auto get_isa_levels() noexcept -> std::vector<std::string> {
std::vector<std::string> supported_isa_levels;

{
struct utsname un { };
struct utsname un{};
uname(&un);
supported_isa_levels.emplace_back(un.machine);
}
Expand Down
5 changes: 2 additions & 3 deletions gucc/src/initcpio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Check failure on line 26 in gucc/src/initcpio.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

gucc/src/initcpio.cpp:26:16 [clang-diagnostic-error]

no return statement in constexpr function
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<size_t>(std::ranges::distance(rng)));
return modify_initcpio_line(line, modules, files, hooks);
})
Expand All @@ -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);
Expand Down

0 comments on commit 9002dbb

Please sign in to comment.