mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 04:02:57 +08:00
Reuse value
to save enum name
Co-authored-by: Salman Ahmed <frenzibyte@gmail.com>
This commit is contained in:
parent
04bf667d0d
commit
8137eee527
@ -123,8 +123,8 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
if (Enum.TryParse(value, true, out result)) return true;
|
||||
|
||||
string status = Enum.GetNames(typeof(TEnum)).FirstOrDefault(name => name.StartsWith(value, true, CultureInfo.InvariantCulture));
|
||||
return Enum.TryParse(status, true, out result);
|
||||
value = Enum.GetNames(typeof(TEnum)).FirstOrDefault(name => name.StartsWith(value, true, CultureInfo.InvariantCulture));
|
||||
return Enum.TryParse(value, true, out result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user