mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 11:42:54 +08:00
Return Task.CompletedTask
instead of null
This commit is contained in:
parent
a59bf6d373
commit
35eddf35c5
@ -201,16 +201,16 @@ namespace osu.Game.Scoring
|
||||
/// Export a replay from a given <see cref="IScoreInfo"/>.
|
||||
/// </summary>
|
||||
/// <param name="scoreInfo">The <see cref="IScoreInfo"/> to export.</param>
|
||||
/// <returns>The <see cref="Task"/>. Null if the score cannot be found in the database.</returns>
|
||||
/// <returns>The <see cref="Task"/>. Return <see cref="Task.CompletedTask"/> if the score cannot be found in the database.</returns>
|
||||
/// <remarks>
|
||||
/// The <see cref="IScoreInfo"/> is re-retrieved from the database to ensure all the required data
|
||||
/// for exporting a replay are present (may have missing properties if it was retrieved from online data).
|
||||
/// </remarks>
|
||||
public Task? Export(ScoreInfo scoreInfo)
|
||||
public Task Export(ScoreInfo scoreInfo)
|
||||
{
|
||||
ScoreInfo? databasedScoreInfo = getDatabasedScoreInfo(scoreInfo);
|
||||
|
||||
return databasedScoreInfo == null ? null : scoreExporter.ExportAsync(databasedScoreInfo.ToLive(Realm));
|
||||
return databasedScoreInfo == null ? Task.CompletedTask : scoreExporter.ExportAsync(databasedScoreInfo.ToLive(Realm));
|
||||
}
|
||||
|
||||
public Task<Live<ScoreInfo>?> ImportAsUpdate(ProgressNotification notification, ImportTask task, ScoreInfo original) => scoreImporter.ImportAsUpdate(notification, task, original);
|
||||
|
Loading…
Reference in New Issue
Block a user