1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:20:04 +08:00

Fix remaining warnings

This commit is contained in:
Dean Herbert 2017-10-16 13:09:10 +09:00
parent d73c0c0c98
commit 0a6dcdd405
2 changed files with 8 additions and 12 deletions

View File

@ -60,8 +60,6 @@ namespace osu.Game.Beatmaps
private readonly FileStore files;
private readonly OsuDbContext connection;
private readonly RulesetStore rulesets;
private readonly BeatmapStore beatmaps;
@ -93,7 +91,6 @@ namespace osu.Game.Beatmaps
this.storage = storage;
this.files = files;
this.connection = connection;
this.rulesets = rulesets;
this.api = api;
@ -164,7 +161,7 @@ namespace osu.Game.Beatmaps
/// <param name="archiveReader">The beatmap to be imported.</param>
public BeatmapSetInfo Import(ArchiveReader archiveReader)
{
BeatmapSetInfo set = null;
BeatmapSetInfo set;
// let's only allow one concurrent import at a time for now.
lock (importLock)

View File

@ -85,23 +85,22 @@ namespace osu.Game.IO
public void Reference(params FileInfo[] files)
{
var incrementedFiles = files.GroupBy(f => f.ID).Select(f =>
foreach (var f in files.GroupBy(f => f.ID))
{
var accurateRefCount = Connection.Find<FileInfo>(f.First().ID);
accurateRefCount.ReferenceCount += f.Count();
return accurateRefCount;
});
var refetch = Connection.Find<FileInfo>(f.First().ID);
refetch.ReferenceCount += f.Count();
}
Connection.SaveChanges();
}
public void Dereference(params FileInfo[] files)
{
var incrementedFiles = files.GroupBy(f => f.ID).Select(f =>
foreach (var f in files.GroupBy(f => f.ID))
{
var accurateRefCount = Connection.Find<FileInfo>(f.First().ID);
accurateRefCount.ReferenceCount -= f.Count();
return accurateRefCount;
});
}
Connection.SaveChanges();
}