Use CiByteString for anything path-related.

This commit is contained in:
Ottermandias 2024-07-30 18:53:55 +02:00
parent 9d128a4d83
commit d247f83e1d
42 changed files with 163 additions and 124 deletions

View file

@ -8,12 +8,12 @@ namespace Penumbra.Collections.Cache;
public sealed class ImcCache(MetaFileManager manager, ModCollection collection) : MetaCacheBase<ImcIdentifier, ImcEntry>(manager, collection)
{
private readonly Dictionary<ByteString, (ImcFile, HashSet<ImcIdentifier>)> _imcFiles = [];
private readonly Dictionary<CiByteString, (ImcFile, HashSet<ImcIdentifier>)> _imcFiles = [];
public bool HasFile(ByteString path)
public bool HasFile(CiByteString path)
=> _imcFiles.ContainsKey(path);
public bool GetFile(ByteString path, [NotNullWhen(true)] out ImcFile? file)
public bool GetFile(CiByteString path, [NotNullWhen(true)] out ImcFile? file)
{
if (!_imcFiles.TryGetValue(path, out var p))
{