1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 03:22:55 +08:00

Reorder if statement

This commit is contained in:
Paul Teng 2018-09-24 21:35:13 -04:00
parent dd36b6a381
commit 319ed1bf0f

View File

@ -47,14 +47,14 @@ namespace osu.Game.Rulesets.Scoring
public Score ReadReplayFile(string replayFilename) public Score ReadReplayFile(string replayFilename)
{ {
if (!File.Exists(replayFilename)) if (File.Exists(replayFilename))
{ {
Logger.Log($"Replay file {replayFilename} cannot be found", LoggingTarget.Information, LogLevel.Error); using (var stream = File.OpenRead(replayFilename))
return null; return new DatabasedLegacyScoreParser(rulesets, beatmaps).Parse(stream);
} }
using (var stream = File.OpenRead(replayFilename)) Logger.Log($"Replay file {replayFilename} cannot be found", LoggingTarget.Information, LogLevel.Error);
return new DatabasedLegacyScoreParser(rulesets, beatmaps).Parse(stream); return null;
} }
} }
} }