Apply brace style.

This commit is contained in:
Huo Yaoyuan
2019-11-11 19:53:22 +08:00
parent 3d1c31f2ae
commit ccc8aa6fa4
58 changed files with 214 additions and 52 deletions

View File

@ -265,8 +265,10 @@ namespace osu.Game.Database
// for now, concatenate all .osu files in the set to create a unique hash.
MemoryStream hashable = new MemoryStream();
foreach (string file in reader.Filenames.Where(f => HashableFileTypes.Any(f.EndsWith)))
{
using (Stream s = reader.GetStream(file))
s.CopyTo(hashable);
}
return hashable.Length > 0 ? hashable.ComputeSHA2Hash() : null;
}
@ -485,12 +487,16 @@ namespace osu.Game.Database
// import files to manager
foreach (string file in reader.Filenames)
{
using (Stream s = reader.GetStream(file))
{
fileInfos.Add(new TFileModel
{
Filename = FileSafety.PathStandardise(file.Substring(prefix.Length)),
FileInfo = files.Add(s)
});
}
}
return fileInfos;
}
@ -651,8 +657,10 @@ namespace osu.Game.Database
private void handleEvent(Action a)
{
if (delayingEvents)
{
lock (queuedEvents)
queuedEvents.Add(a);
}
else
a.Invoke();
}