From 9fd16be2d44f79ba43f21ae297adcfdf11c3b090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Mon, 6 Mar 2017 19:59:29 +0100 Subject: [PATCH] Refactor IsDebug --- osu.Game/OsuGameBase.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index 77de2a176e..c592ded666 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -49,6 +49,7 @@ namespace osu.Game get { bool isDebug = false; + // Debug.Assert conditions are only evaluated in debug mode Debug.Assert(isDebug = true); return isDebug; } @@ -58,11 +59,8 @@ namespace osu.Game { get { - bool isDebug = false; - Debug.Assert(isDebug = true); - if (!IsDeployedBuild) - return @"local " + (isDebug ? @"debug" : @"release"); + return @"local " + (IsDebug ? @"debug" : @"release"); var assembly = AssemblyName; return $@"{assembly.Version.Major}.{assembly.Version.Minor}.{assembly.Version.Build}";