mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-22 23:05:12 +00:00
Reduce use of GetName and SetName, prefer direct
This commit is contained in:
@@ -507,7 +507,7 @@ namespace SabreTools.Metadata.DatFiles
|
||||
if (!string.IsNullOrEmpty(sha1))
|
||||
{
|
||||
name = Utilities.GetDepotPath(sha1, Modifiers.OutputDepot.Depth)?.Replace('\\', '/');
|
||||
item.SetName($"{pre}{name}{post}");
|
||||
disk.Name = $"{pre}{name}{post}";
|
||||
}
|
||||
}
|
||||
else if (item is DatItems.Formats.File file)
|
||||
@@ -517,7 +517,7 @@ namespace SabreTools.Metadata.DatFiles
|
||||
if (!string.IsNullOrEmpty(sha1))
|
||||
{
|
||||
name = Utilities.GetDepotPath(sha1, Modifiers.OutputDepot.Depth)?.Replace('\\', '/');
|
||||
item.SetName($"{pre}{name}{post}");
|
||||
file.SetName($"{pre}{name}{post}");
|
||||
}
|
||||
}
|
||||
else if (item is Media media)
|
||||
@@ -527,7 +527,7 @@ namespace SabreTools.Metadata.DatFiles
|
||||
if (!string.IsNullOrEmpty(sha1))
|
||||
{
|
||||
name = Utilities.GetDepotPath(sha1, Modifiers.OutputDepot.Depth)?.Replace('\\', '/');
|
||||
item.SetName($"{pre}{name}{post}");
|
||||
media.Name = $"{pre}{name}{post}";
|
||||
}
|
||||
}
|
||||
else if (item is Rom rom)
|
||||
@@ -537,7 +537,7 @@ namespace SabreTools.Metadata.DatFiles
|
||||
if (!string.IsNullOrEmpty(sha1))
|
||||
{
|
||||
name = Utilities.GetDepotPath(sha1, Modifiers.OutputDepot.Depth)?.Replace('\\', '/');
|
||||
item.SetName($"{pre}{name}{post}");
|
||||
rom.Name = $"{pre}{name}{post}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user