mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-28 16:09:15 +00:00
Tamper generic explosion and code style
This commit is contained in:
@@ -2,6 +2,13 @@ using System.Numerics;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Tamper.Operations
|
||||
{
|
||||
sealed class OpXorFactory : IOperationFactory
|
||||
{
|
||||
private OpXorFactory() { }
|
||||
|
||||
public static IOperation CreateFor<T>(IOperand destination, IOperand lhs, IOperand rhs) where T : unmanaged, IBinaryInteger<T>
|
||||
=> new OpXor<T>(destination, lhs, rhs);
|
||||
}
|
||||
class OpXor<T> : IOperation where T : unmanaged, IBinaryNumber<T>
|
||||
{
|
||||
readonly IOperand _destination;
|
||||
@@ -19,8 +26,5 @@ namespace Ryujinx.HLE.HOS.Tamper.Operations
|
||||
{
|
||||
_destination.Set(_lhs.Get<T>() ^ _rhs.Get<T>());
|
||||
}
|
||||
|
||||
public static IOperation CreateFor<T1>(IOperand destination, IOperand lhs, IOperand rhs) where T1 : unmanaged, IBinaryInteger<T1>
|
||||
=> new OpXor<T1>(destination, lhs, rhs);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user