mirror of
https://github.com/ppy/osu.git
synced 2025-01-07 20:42:54 +08:00
-renamed function inverse() to reverseInequalityOperator() for clarity
-changed default case of reverseInequalityOperator() to out of range exception
This commit is contained in:
parent
0c1d6eb894
commit
df170517a8
@ -434,16 +434,16 @@ namespace osu.Game.Screens.Select
|
|||||||
dateTimeOffset = dateTimeOffset.AddMilliseconds(1);
|
dateTimeOffset = dateTimeOffset.AddMilliseconds(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return tryUpdateCriteriaRange(ref dateRange, invert(op), dateTimeOffset);
|
return tryUpdateCriteriaRange(ref dateRange, reverseInequalityOperator(op), dateTimeOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function to reverse an Operator
|
// Function to reverse an Operator
|
||||||
private static Operator invert(Operator ope)
|
private static Operator reverseInequalityOperator(Operator ope)
|
||||||
{
|
{
|
||||||
switch (ope)
|
switch (ope)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return Operator.Equal;
|
throw new ArgumentOutOfRangeException(nameof(ope), $"Unsupported operator {ope}");
|
||||||
|
|
||||||
case Operator.Equal:
|
case Operator.Equal:
|
||||||
return Operator.Equal;
|
return Operator.Equal;
|
||||||
|
Loading…
Reference in New Issue
Block a user