From aa95a7ceeea39e4ca536159033fa48aee4718a9d Mon Sep 17 00:00:00 2001 From: ryouze <98982999+ryouze@users.noreply.github.com> Date: Wed, 25 Sep 2024 20:23:19 +0200 Subject: [PATCH] Fix missing or redundant headers. --- src/app.cpp | 3 +-- src/core/env.cpp | 2 +- src/core/shell.cpp | 11 +++++------ src/core/sysctl.hpp | 2 +- src/modules/cpu.cpp | 3 +-- src/modules/host.cpp | 7 ++++--- 6 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/app.cpp b/src/app.cpp index cf8e0fe..5b1ee05 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -2,8 +2,7 @@ * @file app.cpp */ -#include // for std::runtime_error -#include // for std::string +#include // for std::string #include #include diff --git a/src/core/env.cpp b/src/core/env.cpp index d56a58c..44e0b4d 100644 --- a/src/core/env.cpp +++ b/src/core/env.cpp @@ -3,7 +3,7 @@ */ #include // for std::getenv -#include // for std::optional +#include // for std::optional, std::nullopt #include // for std::string #include "env.hpp" diff --git a/src/core/shell.cpp b/src/core/shell.cpp index a4cd1f3..355134b 100644 --- a/src/core/shell.cpp +++ b/src/core/shell.cpp @@ -2,12 +2,11 @@ * @file shell.cpp */ -#include // for std::array -#include // for popen, pclose, FILE, fgets -#include // for std::unique_ptr -#include // for std::optional -#include // for std::runtime_error -#include // for std::string +#include // for std::array +#include // for popen, pclose, FILE, fgets +#include // for std::unique_ptr +#include // for std::optional, std::nullopt +#include // for std::string #include diff --git a/src/core/sysctl.hpp b/src/core/sysctl.hpp index e691a99..3926df2 100644 --- a/src/core/sysctl.hpp +++ b/src/core/sysctl.hpp @@ -7,7 +7,7 @@ #pragma once #include // for std::size_t -#include // for std::optional +#include // for std::optional, std::nullopt #include // for std::string #include // for ::sysctl, ::sysctlbyname #include // for std::is_arithmetic_v, std::is_standard_layout_v, std::is_trivial_v diff --git a/src/modules/cpu.cpp b/src/modules/cpu.cpp index 399b527..be42974 100644 --- a/src/modules/cpu.cpp +++ b/src/modules/cpu.cpp @@ -2,8 +2,7 @@ * @file cpu.cpp */ -#include // for std::optional -#include // for std::string +#include // for std::string #include "core/sysctl.hpp" #include "cpu.hpp" diff --git a/src/modules/host.cpp b/src/modules/host.cpp index 9bc27a8..ce98238 100644 --- a/src/modules/host.cpp +++ b/src/modules/host.cpp @@ -2,11 +2,12 @@ * @file host.cpp */ -#include // for std::remove_if -#include // for std::array +#include // for std::remove_if, std::all_of #include // for std::isspace, std::isdigit +#include // for std::size_t #include // for std::time_t, std::time, std::difftime -#include // for std::string +#include // for std::exception +#include // for std::string, std::to_string, std::stoi #include // for utsname, uname #include