1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 20:22:55 +08:00

Rename method to match convention better

This commit is contained in:
Bartłomiej Dach 2024-03-19 18:28:13 +01:00
parent feaf59e15f
commit 320373e3e0
No known key found for this signature in database

View File

@ -69,7 +69,7 @@ namespace osu.Game.Screens.Select
return TryUpdateCriteriaRange(ref criteria.BeatDivisor, op, value, tryParseInt);
case "status":
return TryUpdateSetRange(ref criteria.OnlineStatus, op, value, tryParseEnum);
return TryUpdateCriteriaSet(ref criteria.OnlineStatus, op, value, tryParseEnum);
case "creator":
case "author":
@ -310,11 +310,11 @@ namespace osu.Game.Screens.Select
/// <param name="op">The operator for the keyword filter.</param>
/// <param name="val">The value of the keyword filter.</param>
/// <param name="parseFunction">Function used to determine if <paramref name="val"/> can be converted to type <typeparamref name="T"/>.</param>
public static bool TryUpdateSetRange<T>(ref FilterCriteria.OptionalSet<T> range, Operator op, string val, TryParseFunction<T> parseFunction)
public static bool TryUpdateCriteriaSet<T>(ref FilterCriteria.OptionalSet<T> range, Operator op, string val, TryParseFunction<T> parseFunction)
where T : struct
=> parseFunction.Invoke(val, out var converted) && tryUpdateSetRange(ref range, op, converted);
=> parseFunction.Invoke(val, out var converted) && tryUpdateCriteriaSet(ref range, op, converted);
private static bool tryUpdateSetRange<T>(ref FilterCriteria.OptionalSet<T> range, Operator op, T value)
private static bool tryUpdateCriteriaSet<T>(ref FilterCriteria.OptionalSet<T> range, Operator op, T value)
where T : struct
{
var enumValues = (T[])Enum.GetValues(typeof(T));