mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 21:07:18 +09:00
Move private method down in class
This commit is contained in:
parent
cd9aa38d3d
commit
f470b7095d
@ -342,22 +342,6 @@ namespace osu.Game.Database
|
|||||||
return item.Hash;
|
return item.Hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string computeHashFast(ArchiveReader reader)
|
|
||||||
{
|
|
||||||
MemoryStream hashable = new MemoryStream();
|
|
||||||
|
|
||||||
foreach (var file in reader.Filenames.Where(f => HashableFileTypes.Any(ext => f.EndsWith(ext, StringComparison.OrdinalIgnoreCase))).OrderBy(f => f))
|
|
||||||
{
|
|
||||||
using (Stream s = reader.GetStream(file))
|
|
||||||
s.CopyTo(hashable);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hashable.Length > 0)
|
|
||||||
return hashable.ComputeSHA2Hash();
|
|
||||||
|
|
||||||
return reader.Name.ComputeSHA2Hash();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Silently import an item from a <typeparamref name="TModel"/>.
|
/// Silently import an item from a <typeparamref name="TModel"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -686,6 +670,22 @@ namespace osu.Game.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string computeHashFast(ArchiveReader reader)
|
||||||
|
{
|
||||||
|
MemoryStream hashable = new MemoryStream();
|
||||||
|
|
||||||
|
foreach (var file in reader.Filenames.Where(f => HashableFileTypes.Any(ext => f.EndsWith(ext, StringComparison.OrdinalIgnoreCase))).OrderBy(f => f))
|
||||||
|
{
|
||||||
|
using (Stream s = reader.GetStream(file))
|
||||||
|
s.CopyTo(hashable);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hashable.Length > 0)
|
||||||
|
return hashable.ComputeSHA2Hash();
|
||||||
|
|
||||||
|
return reader.Name.ComputeSHA2Hash();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create all required <see cref="IO.FileInfo"/>s for the provided archive, adding them to the global file store.
|
/// Create all required <see cref="IO.FileInfo"/>s for the provided archive, adding them to the global file store.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user