Refactor exposed mod retrieval methods for better safety

This commit is contained in:
Dean Herbert
2021-09-10 11:09:13 +09:00
parent ce6b022a90
commit cf633973a9
19 changed files with 75 additions and 64 deletions

View File

@ -38,25 +38,25 @@ namespace osu.Game.Benchmarks
[Benchmark]
public void BenchmarkGetAllMods()
{
ruleset.GetAllMods().Consume(new Consumer());
ruleset.CreateAllMods().Consume(new Consumer());
}
[Benchmark]
public void BenchmarkGetAllModsForReference()
{
ruleset.GetAllModsForReference().Consume(new Consumer());
ruleset.AllMods.Consume(new Consumer());
}
[Benchmark]
public void BenchmarkGetForAcronym()
{
ruleset.GetModForAcronym("DT");
ruleset.CreateModFromAcronym("DT");
}
[Benchmark]
public void BenchmarkGetForType()
{
ruleset.GetMod<ModDoubleTime>();
ruleset.CreateMod<ModDoubleTime>();
}
}
}