Avoid constructor overhead for realm BeatmapSetInfo parameterless constructor

This commit is contained in:
Dean Herbert
2022-01-20 16:49:39 +09:00
parent 3c852e6d02
commit ccddf9b47d
2 changed files with 18 additions and 1 deletions

View File

@ -48,6 +48,7 @@ namespace osu.Game.Database
copyChangesToRealm(s.Metadata, d.Metadata);
});
c.CreateMap<BeatmapSetInfo, BeatmapSetInfo>()
.ConstructUsing(_ => new BeatmapSetInfo(null))
.ForMember(s => s.Beatmaps, cc => cc.Ignore())
.AfterMap((s, d) =>
{
@ -77,6 +78,7 @@ namespace osu.Game.Database
applyCommonConfiguration(c);
c.CreateMap<BeatmapSetInfo, BeatmapSetInfo>()
.ConstructUsing(_ => new BeatmapSetInfo(null))
.MaxDepth(2)
.AfterMap((s, d) =>
{
@ -109,6 +111,7 @@ namespace osu.Game.Database
applyCommonConfiguration(c);
c.CreateMap<BeatmapSetInfo, BeatmapSetInfo>()
.ConstructUsing(_ => new BeatmapSetInfo(null))
.MaxDepth(2)
.ForMember(b => b.Files, cc => cc.Ignore())
.AfterMap((s, d) =>