mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-18 22:07:45 +01:00
Use CiByteString for anything path-related.
This commit is contained in:
parent
9d128a4d83
commit
d247f83e1d
42 changed files with 163 additions and 124 deletions
|
|
@ -216,10 +216,10 @@ public static class ResourceExtensions
|
|||
};
|
||||
}
|
||||
|
||||
public static ResourceType Type(ByteString path)
|
||||
public static ResourceType Type(CiByteString path)
|
||||
{
|
||||
var extIdx = path.LastIndexOf((byte)'.');
|
||||
var ext = extIdx == -1 ? path : extIdx == path.Length - 1 ? ByteString.Empty : path.Substring(extIdx + 1);
|
||||
var ext = extIdx == -1 ? path : extIdx == path.Length - 1 ? CiByteString.Empty : path.Substring(extIdx + 1);
|
||||
|
||||
return ext.Length switch
|
||||
{
|
||||
|
|
@ -231,7 +231,7 @@ public static class ResourceExtensions
|
|||
};
|
||||
}
|
||||
|
||||
public static ResourceCategory Category(ByteString path)
|
||||
public static ResourceCategory Category(CiByteString path)
|
||||
{
|
||||
if (path.Length < 3)
|
||||
return ResourceCategory.Debug;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue