diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-09-30 16:16:20 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-10-07 13:37:39 +0200 |
commit | 030af3e7af210617df00bf850476df6b46fb004d (patch) | |
tree | 6bfaff768b035c382fe0db07909ecd1f908f1eaf /src/buildtool/execution_engine/executor/executor.hpp | |
parent | ce23db59c6399199fa55b4b7dc8880522e2f1bca (diff) | |
download | justbuild-030af3e7af210617df00bf850476df6b46fb004d.tar.gz |
Enable readability-* checks.
Diffstat (limited to 'src/buildtool/execution_engine/executor/executor.hpp')
-rw-r--r-- | src/buildtool/execution_engine/executor/executor.hpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp index 66790696..a25958b2 100644 --- a/src/buildtool/execution_engine/executor/executor.hpp +++ b/src/buildtool/execution_engine/executor/executor.hpp @@ -645,10 +645,13 @@ class ExecutorImpl { auto message = ""s; bool has_both = has_err and has_out; if (has_err or has_out) { - message += (has_both ? "Output"s - : has_out ? "Stdout"s - : "Stderr"s) + - " of command "; + if (has_both) { + message += "Output"s; + } + else { + message += has_out ? "Stdout"s : "Stderr"s; + } + message += " of command "; } message += nlohmann::json(action->Command()).dump() + " in environment " + @@ -694,14 +697,13 @@ class ExecutorImpl { logger.Emit(LogLevel::Error, "{}", msg.str()); } - [[nodiscard]] static inline auto ScaleTime(std::chrono::milliseconds t, - double f) - -> std::chrono::milliseconds { + [[nodiscard]] static auto ScaleTime(std::chrono::milliseconds t, + double f) -> std::chrono::milliseconds { return std::chrono::milliseconds( std::lround(static_cast<double>(t.count()) * f)); } - [[nodiscard]] static inline auto MergeProperties( + [[nodiscard]] static auto MergeProperties( const ExecutionProperties& base, const ExecutionProperties& overlay) { ExecutionProperties result = base; @@ -715,7 +717,7 @@ class ExecutorImpl { /// \brief Get the alternative endpoint based on a specified set of platform /// properties. These are checked against the dispatch list of an existing /// remote context. - [[nodiscard]] static inline auto GetAlternativeEndpoint( + [[nodiscard]] static auto GetAlternativeEndpoint( const ExecutionProperties& properties, const gsl::not_null<RemoteContext const*>& remote_context, const gsl::not_null<HashFunction const*>& hash_function) |