Skip to content

Commit 0249437

Browse files
committed
Reorder conditionals to prefer most common case first
1 parent 641f0f4 commit 0249437

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

osu.Server.Queues.ScoreStatisticsProcessor/Commands/Maintenance/MarkNonPreservedScoresCommand.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,11 @@ private async Task processUser(MySqlConnection db, int userId, CancellationToken
8080
if (cancellationToken.IsCancellationRequested)
8181
break;
8282

83-
if (pins.Contains(score.id))
83+
// check whether this score is a user high (either total_score or pp)
84+
if (checkIsUserHigh(scores, score, out var preservedAlternatives))
8485
{
8586
if (Verbose)
86-
formatOutput(score, false, "pinned score");
87+
formatOutput(score, false, "user high");
8788
continue;
8889
}
8990

@@ -94,11 +95,10 @@ private async Task processUser(MySqlConnection db, int userId, CancellationToken
9495
continue;
9596
}
9697

97-
// check whether this score is a user high (either total_score or pp)
98-
if (checkIsUserHigh(scores, score, out var preservedAlternatives))
98+
if (pins.Contains(score.id))
9999
{
100100
if (Verbose)
101-
formatOutput(score, false, "user high");
101+
formatOutput(score, false, "pinned score");
102102
continue;
103103
}
104104

0 commit comments

Comments
 (0)