summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/execution_service/server_implementation.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-08-05 12:40:04 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-08-07 14:43:19 +0200
commited6f31f4c9939d6cc8d4d317d561a94545750b0b (patch)
tree122e2a01c4a56b0fc25d94236d459101ffb80f65 /src/buildtool/execution_api/execution_service/server_implementation.cpp
parent4989605b096701fee6f1049bdad0827f81d9fb00 (diff)
downloadjustbuild-ed6f31f4c9939d6cc8d4d317d561a94545750b0b.tar.gz
Replace classic C boolean operators with keywords
! => not; && => and, || => or
Diffstat (limited to 'src/buildtool/execution_api/execution_service/server_implementation.cpp')
-rw-r--r--src/buildtool/execution_api/execution_service/server_implementation.cpp12
1 files changed, 6 insertions, 6 deletions
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 <typename T>
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<LocalContext const*> 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<LocalContext const*> 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<LocalContext const*> 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;
}