From 5251ccc297a393b0a633bb3c6c199219fcb294ac Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sun, 12 Sep 2021 15:35:07 -0400 Subject: [PATCH] C# 7 compatibility --- src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs b/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs index 408d27f61e..790dee9cc9 100644 --- a/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs +++ b/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs @@ -707,7 +707,7 @@ namespace Tgstation.Server.Host.Components.Deployment /// A representing the running operation. async Task ProgressTask(JobProgressReporter progressReporter, TimeSpan? estimatedDuration, CancellationToken cancellationToken) { - progressReporter(currentStage, estimatedDuration.HasValue ? 0 : null); + progressReporter(currentStage, estimatedDuration.HasValue ? (int?)0 : null); var sleepInterval = estimatedDuration.HasValue ? estimatedDuration.Value / 100 : TimeSpan.FromMilliseconds(250); logger.LogDebug("Compile is expected to take: {0}", estimatedDuration); @@ -716,7 +716,7 @@ namespace Tgstation.Server.Host.Components.Deployment for (var iteration = 0; iteration < (estimatedDuration.HasValue ? 99 : Int32.MaxValue); ++iteration) { await Task.Delay(sleepInterval, cancellationToken).ConfigureAwait(false); - progressReporter(currentStage, estimatedDuration.HasValue ? iteration + 1 : null); + progressReporter(currentStage, estimatedDuration.HasValue ? (int?)(iteration + 1) : null); } } catch (OperationCanceledException)