mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Resolve equals usages.
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
public class KeyCounterAction<T> : KeyCounter
|
||||
@ -16,7 +18,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public bool OnPressed(T action, bool forwards)
|
||||
{
|
||||
if (!action.Equals(Action))
|
||||
if (!EqualityComparer<T>.Default.Equals(action, Action))
|
||||
return false;
|
||||
|
||||
IsLit = true;
|
||||
@ -27,7 +29,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public bool OnReleased(T action, bool forwards)
|
||||
{
|
||||
if (!action.Equals(Action))
|
||||
if (!EqualityComparer<T>.Default.Equals(action, Action))
|
||||
return false;
|
||||
|
||||
IsLit = false;
|
||||
|
Reference in New Issue
Block a user