diff options
Diffstat (limited to 'zenserver/upstream')
| -rw-r--r-- | zenserver/upstream/jupiter.cpp | 1 | ||||
| -rw-r--r-- | zenserver/upstream/upstreamapply.cpp | 17 | ||||
| -rw-r--r-- | zenserver/upstream/upstreamcache.cpp | 22 |
3 files changed, 14 insertions, 26 deletions
diff --git a/zenserver/upstream/jupiter.cpp b/zenserver/upstream/jupiter.cpp index ffb9b1cbf..c952d8e10 100644 --- a/zenserver/upstream/jupiter.cpp +++ b/zenserver/upstream/jupiter.cpp @@ -25,7 +25,6 @@ ZEN_THIRD_PARTY_INCLUDES_END #include <json11.hpp> using namespace std::literals; -using namespace fmt::literals; namespace zen { diff --git a/zenserver/upstream/upstreamapply.cpp b/zenserver/upstream/upstreamapply.cpp index f8a8c3e62..fe7f7d9c8 100644 --- a/zenserver/upstream/upstreamapply.cpp +++ b/zenserver/upstream/upstreamapply.cpp @@ -53,10 +53,9 @@ namespace detail { , m_CasStore(CasStore) , m_CidStore(CidStore) { - using namespace fmt::literals; - m_DisplayName = "Horde - '{}'"_format(Options.ServiceUrl); + m_DisplayName = fmt::format("Horde - '{}'", Options.ServiceUrl); m_Client = new CloudCacheClient(Options); - m_ChannelId = "zen-{}"_format(zen::GetSessionIdString()); + m_ChannelId = fmt::format("zen-{}", zen::GetSessionIdString()); } virtual ~HordeUpstreamApplyEndpoint() = default; @@ -442,14 +441,13 @@ namespace detail { if (Outcome != ComputeTaskOutcome::Success) { - using namespace fmt::literals; const std::string_view Detail = TaskStatus["d"sv].AsString(); if (!Detail.empty()) { return {.Error{.ErrorCode = -1, - .Reason = "Task {}: {}"_format(ComputeTaskOutcomeToString(Outcome), std::string(Detail))}}; + .Reason = fmt::format("Task {}: {}", ComputeTaskOutcomeToString(Outcome), std::string(Detail))}}; } - return {.Error{.ErrorCode = -1, .Reason = "Task {}"_format(ComputeTaskOutcomeToString(Outcome))}}; + return {.Error{.ErrorCode = -1, .Reason = fmt::format("Task {}", ComputeTaskOutcomeToString(Outcome))}}; } const IoHash TaskId = TaskStatus["h"sv].AsObjectAttachment(); @@ -713,8 +711,6 @@ namespace detail { [[nodiscard]] bool ProcessApplyKey(const UpstreamApplyRecord& ApplyRecord, UpstreamData& Data) { - using namespace fmt::literals; - std::string ExecutablePath; std::map<std::string, std::string> Environment; std::set<std::filesystem::path> InputFiles; @@ -749,7 +745,7 @@ namespace detail { for (auto& It : ApplyRecord.WorkerDescriptor["dirs"sv]) { std::string_view Directory = It.AsString(); - std::string DummyFile = "{}/.zen_empty_file"_format(Directory); + std::string DummyFile = fmt::format("{}/.zen_empty_file", Directory); InputFiles.insert(DummyFile); Data.Blobs[EmptyBufferId] = EmptyBuffer; InputFileHashes[DummyFile] = EmptyBufferId; @@ -816,7 +812,6 @@ namespace detail { Data.Objects[SandboxHash] = std::move(Sandbox); { - using namespace fmt::literals; std::string_view HostPlatform = ApplyRecord.WorkerDescriptor["host"sv].AsString(); if (HostPlatform.empty()) { @@ -829,7 +824,7 @@ namespace detail { bool Exclusive = ApplyRecord.WorkerDescriptor["exclusive"sv].AsBool(); // TODO: Remove override when Horde accepts the UE style Host Platforms (Win64, Linux, Mac) - std::string Condition = "Platform == '{}'"_format(HostPlatform); + std::string Condition = fmt::format("Platform == '{}'", HostPlatform); if (HostPlatform == "Win64") { Condition += " && Pool == 'Win-RemoteExec'"; diff --git a/zenserver/upstream/upstreamcache.cpp b/zenserver/upstream/upstreamcache.cpp index 2ed74cdd4..1a35f7283 100644 --- a/zenserver/upstream/upstreamcache.cpp +++ b/zenserver/upstream/upstreamcache.cpp @@ -48,7 +48,7 @@ namespace detail { virtual ~JupiterUpstreamEndpoint() = default; - virtual const UpstreamEndpointInfo& GetEndpointInfo() const { return m_Info; } + virtual const UpstreamEndpointInfo& GetEndpointInfo() const override { return m_Info; } virtual UpstreamEndpointHealth Initialize() override { return CheckHealth(); } @@ -270,8 +270,6 @@ namespace detail { { ZEN_TRACE_CPU("Upstream::Horde::PutCacheRecord"); - using namespace fmt::literals; - ZEN_ASSERT(CacheRecord.PayloadIds.size() == Payloads.size()); const int32_t MaxAttempts = 3; @@ -313,7 +311,7 @@ namespace detail { if (It == std::end(CacheRecord.PayloadIds)) { - OutReason = "payload '{}' MISSING from local cache"_format(PayloadId); + OutReason = fmt::format("payload '{}' MISSING from local cache", PayloadId); return false; } @@ -329,7 +327,7 @@ namespace detail { if (!BlobResult.Success) { - OutReason = "upload payload '{}' FAILED, reason '{}'"_format(PayloadId, BlobResult.Reason); + OutReason = fmt::format("upload payload '{}' FAILED, reason '{}'", PayloadId, BlobResult.Reason); return false; } @@ -350,7 +348,7 @@ namespace detail { if (!RefResult.Success) { - return {.Reason = "upload cache record '{}/{}' FAILED, reason '{}'"_format(CacheRecord.Key.Bucket, + return {.Reason = fmt::format("upload cache record '{}/{}' FAILED, reason '{}'", CacheRecord.Key.Bucket, CacheRecord.Key.Hash, RefResult.Reason), .Success = false}; @@ -371,7 +369,7 @@ namespace detail { if (!FinalizeResult.Success) { - return {.Reason = "finalize cache record '{}/{}' FAILED, reason '{}'"_format(CacheRecord.Key.Bucket, + return {.Reason = fmt::format("finalize cache record '{}/{}' FAILED, reason '{}'", CacheRecord.Key.Bucket, CacheRecord.Key.Hash, FinalizeResult.Reason), .Success = false}; @@ -389,7 +387,7 @@ namespace detail { if (!FinalizeResult.Success) { - return {.Reason = "finalize '{}/{}' FAILED, reason '{}'"_format(CacheRecord.Key.Bucket, + return {.Reason = fmt::format("finalize '{}/{}' FAILED, reason '{}'", CacheRecord.Key.Bucket, CacheRecord.Key.Hash, FinalizeResult.Reason), .Success = false}; @@ -403,7 +401,7 @@ namespace detail { Sb << MissingHash.ToHexString() << ","; } - return {.Reason = "finalize '{}/{}' FAILED, still needs payload(s) '{}'"_format(CacheRecord.Key.Bucket, + return {.Reason = fmt::format("finalize '{}/{}' FAILED, still needs payload(s) '{}'", CacheRecord.Key.Bucket, CacheRecord.Key.Hash, Sb.ToString()), .Success = false}; @@ -476,12 +474,10 @@ namespace detail { ~ZenUpstreamEndpoint() = default; - virtual const UpstreamEndpointInfo& GetEndpointInfo() const { return m_Info; } + virtual const UpstreamEndpointInfo& GetEndpointInfo() const override { return m_Info; } virtual UpstreamEndpointHealth Initialize() override { - using namespace fmt::literals; - const ZenEndpoint& Ep = GetEndpoint(); if (Ep.Ok) { @@ -500,8 +496,6 @@ namespace detail { virtual UpstreamEndpointHealth CheckHealth() override { - using namespace fmt::literals; - try { if (m_Client.IsNull()) |