mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 15:33:05 +08:00
Fix remaining warnings
This commit is contained in:
parent
d73c0c0c98
commit
0a6dcdd405
@ -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)
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user