1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:42:57 +08:00

-renamed function inverse() to reverseInequalityOperator() for clarity

-changed default case of reverseInequalityOperator() to out of range exception
This commit is contained in:
Elvendir 2023-04-05 11:59:31 +02:00
parent 0c1d6eb894
commit df170517a8

View File

@ -434,16 +434,16 @@ namespace osu.Game.Screens.Select
dateTimeOffset = dateTimeOffset.AddMilliseconds(1);
}
return tryUpdateCriteriaRange(ref dateRange, invert(op), dateTimeOffset);
return tryUpdateCriteriaRange(ref dateRange, reverseInequalityOperator(op), dateTimeOffset);
}
// Function to reverse an Operator
private static Operator invert(Operator ope)
private static Operator reverseInequalityOperator(Operator ope)
{
switch (ope)
{
default:
return Operator.Equal;
throw new ArgumentOutOfRangeException(nameof(ope), $"Unsupported operator {ope}");
case Operator.Equal:
return Operator.Equal;