From ed6f31f4c9939d6cc8d4d317d561a94545750b0b Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Mon, 5 Aug 2024 12:40:04 +0200 Subject: Replace classic C boolean operators with keywords ! => not; && => and, || => or --- .../execution_service/server_implementation.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/buildtool/execution_api/execution_service/server_implementation.cpp') diff --git a/src/buildtool/execution_api/execution_service/server_implementation.cpp b/src/buildtool/execution_api/execution_service/server_implementation.cpp index 43edd6aa..988d22a7 100644 --- a/src/buildtool/execution_api/execution_service/server_implementation.cpp +++ b/src/buildtool/execution_api/execution_service/server_implementation.cpp @@ -41,7 +41,7 @@ namespace { template auto TryWrite(std::string const& file, T const& content) noexcept -> bool { std::ofstream of{file}; - if (!of.good()) { + if (not of.good()) { Logger::Log(LogLevel::Error, "Could not open {}. Make sure to have write permissions", file); @@ -123,7 +123,7 @@ auto ServerImpl::Run(gsl::not_null const& local_context, fmt::format("{}:{}", interface_, port_), creds, &port_); auto server = builder.BuildAndStart(); - if (!server) { + if (not server) { Logger::Log(LogLevel::Error, "Could not start execution service"); return false; } @@ -133,8 +133,8 @@ auto ServerImpl::Run(gsl::not_null const& local_context, nlohmann::json const& info = { {"interface", interface_}, {"port", port_}, {"pid", pid}}; - if (!pid_file_.empty()) { - if (!TryWrite(pid_file_, pid)) { + if (not pid_file_.empty()) { + if (not TryWrite(pid_file_, pid)) { server->Shutdown(); return false; } @@ -146,8 +146,8 @@ auto ServerImpl::Run(gsl::not_null const& local_context, Compatibility::IsCompatible() ? "compatible " : "", info_str)); - if (!info_file_.empty()) { - if (!TryWrite(info_file_, info_str)) { + if (not info_file_.empty()) { + if (not TryWrite(info_file_, info_str)) { server->Shutdown(); return false; } -- cgit v1.2.3