1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 02:22:55 +08:00

Refactor IsDebug

This commit is contained in:
Thomas Müller 2017-03-06 19:59:29 +01:00
parent 1e48b0a037
commit 9fd16be2d4

View File

@ -49,6 +49,7 @@ namespace osu.Game
get get
{ {
bool isDebug = false; bool isDebug = false;
// Debug.Assert conditions are only evaluated in debug mode
Debug.Assert(isDebug = true); Debug.Assert(isDebug = true);
return isDebug; return isDebug;
} }
@ -58,11 +59,8 @@ namespace osu.Game
{ {
get get
{ {
bool isDebug = false;
Debug.Assert(isDebug = true);
if (!IsDeployedBuild) if (!IsDeployedBuild)
return @"local " + (isDebug ? @"debug" : @"release"); return @"local " + (IsDebug ? @"debug" : @"release");
var assembly = AssemblyName; var assembly = AssemblyName;
return $@"{assembly.Version.Major}.{assembly.Version.Minor}.{assembly.Version.Build}"; return $@"{assembly.Version.Major}.{assembly.Version.Minor}.{assembly.Version.Build}";