From 40b9d1bc5ef7b3f0c63766a7478f278aaa565cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Thu, 24 Dec 2020 12:45:01 +0100 Subject: [PATCH] Invert if & early-return to reduce nesting --- .../RealtimeMultiplayer/Match/RealtimeReadyButton.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game/Screens/Multi/RealtimeMultiplayer/Match/RealtimeReadyButton.cs b/osu.Game/Screens/Multi/RealtimeMultiplayer/Match/RealtimeReadyButton.cs index 962c6bbead..be405feef1 100644 --- a/osu.Game/Screens/Multi/RealtimeMultiplayer/Match/RealtimeReadyButton.cs +++ b/osu.Game/Screens/Multi/RealtimeMultiplayer/Match/RealtimeReadyButton.cs @@ -107,11 +107,11 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer.Match private void playSound() { - if (sampleReadyCount != null) - { - sampleReadyCount.Frequency.Value = 0.77f + countReady * 0.06f; - sampleReadyCount.Play(); - } + if (sampleReadyCount == null) + return; + + sampleReadyCount.Frequency.Value = 0.77f + countReady * 0.06f; + sampleReadyCount.Play(); } private void updateButtonColour(bool green)