Remove synchronous lookup path from BeatmapDifficultyCache

This commit is contained in:
Dean Herbert
2020-11-06 14:53:15 +09:00
parent 1dcbf15d81
commit c5b172d0dd
2 changed files with 3 additions and 14 deletions

View File

@ -112,19 +112,6 @@ namespace osu.Game.Beatmaps
}, token, TaskCreationOptions.HideScheduler | TaskCreationOptions.RunContinuationsAsynchronously, updateScheduler);
}
/// <summary>
/// Retrieves the difficulty of a <see cref="BeatmapInfo"/>.
/// </summary>
/// <param name="beatmapInfo">The <see cref="BeatmapInfo"/> to get the difficulty of.</param>
/// <param name="rulesetInfo">The <see cref="RulesetInfo"/> to get the difficulty with.</param>
/// <param name="mods">The <see cref="Mod"/>s to get the difficulty with.</param>
/// <returns>The <see cref="StarDifficulty"/>.</returns>
public StarDifficulty GetDifficulty([NotNull] BeatmapInfo beatmapInfo, [CanBeNull] RulesetInfo rulesetInfo = null, [CanBeNull] IEnumerable<Mod> mods = null)
{
// this is safe in this usage because the only asynchronous part is handled by the local scheduler.
return GetDifficultyAsync(beatmapInfo, rulesetInfo, mods).Result;
}
/// <summary>
/// Retrieves the <see cref="DifficultyRating"/> that describes a star rating.
/// </summary>