Tiny cleanup

This commit is contained in:
Marek Lemańczyk committed 2025-09-19 23:58:57 +02:00
1 parent b3633d0a5c
commit 22be048c15
1 file changed
+3 -10
+3 -10
View File
@@ -241,8 +241,9 @@ internal static class Program
string header = string.IsNullOrWhiteSpace(headerLine) ? DefaultHeader : headerLine.Trim();
List<CandidateResult> candidates = LoadCandidates(reader, pMin, pMax, threadCount, bufferSize);
Console.WriteLine("Sorting...");
List<CandidateResult> sortedPrimeResults = ExtractSortedPrimeCandidates(candidates);
Console.WriteLine("Building primes list...");
List<CandidateResult> primeResults = BuildRawPrimeResults(candidates, sortedPrimeResults);
string rawOutputPath = BuildOutputPath(inputPath, "raw-primes-");
@@ -682,15 +683,7 @@ internal static class Program
{
public static readonly CandidateResultComparer Instance = new();
public int Compare(CandidateResult x, CandidateResult y)
{
if (x.P == y.P)
{
return 0;
}
return x.P < y.P ? -1 : 1;
}
public int Compare(CandidateResult x, CandidateResult y) => x.P == y.P ? 0 : x.P < y.P ? -1 : 1;
}
private readonly struct ChunkResult