HipcGenerator: skip do-nothing call to MemoryMarshal.Cast<byte, byte>() in generated code
This commit is contained in:
parent
d4d0a48bfe
commit
efbea8ab03
1 changed files with 3 additions and 1 deletions
|
@ -719,7 +719,9 @@ namespace Ryujinx.Horizon.Generators.Hipc
|
|||
|
||||
private static string GenerateSpanCast(string targetType, string input)
|
||||
{
|
||||
return $"MemoryMarshal.Cast<byte, {targetType}>({input})";
|
||||
return targetType == "byte"
|
||||
? input
|
||||
: $"MemoryMarshal.Cast<byte, {targetType}>({input})";
|
||||
}
|
||||
|
||||
private static bool HasAttribute(Compilation compilation, ParameterSyntax parameterSyntax, string fullAttributeName)
|
||||
|
|
Loading…
Add table
Reference in a new issue