From 938c5feea4fddc4eae862cb3d9171b1fabdbe1d8 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Tue, 21 Nov 2017 13:42:42 +0300 Subject: [PATCH] Simplify interaction condition --- osu.Game/Overlays/Profile/RankChart.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Overlays/Profile/RankChart.cs b/osu.Game/Overlays/Profile/RankChart.cs index 0ff7914fa9..92655f2993 100644 --- a/osu.Game/Overlays/Profile/RankChart.cs +++ b/osu.Game/Overlays/Profile/RankChart.cs @@ -146,7 +146,7 @@ namespace osu.Game.Overlays.Profile protected override bool OnHover(InputState state) { - if (ranks != null && ranks.Length > 1) + if (ranks?.Length > 1) { graph.UpdateBallPosition(state.Mouse.Position.X); graph.ShowBall(); @@ -156,7 +156,7 @@ namespace osu.Game.Overlays.Profile protected override bool OnMouseMove(InputState state) { - if (ranks != null && ranks.Length > 1) + if (ranks?.Length > 1) graph.UpdateBallPosition(state.Mouse.Position.X); return base.OnMouseMove(state); @@ -164,7 +164,7 @@ namespace osu.Game.Overlays.Profile protected override void OnHoverLost(InputState state) { - if (ranks != null && ranks.Length > 1) + if (ranks?.Length > 1) { graph.HideBall(); updateRankTexts();