Remove unneeded casts

This commit is contained in:
Alex Barney 2018-12-01 14:49:36 -06:00
parent 3ede7b80d9
commit 9ab6334144
5 changed files with 6 additions and 6 deletions

View file

@ -40,7 +40,7 @@ namespace Ryujinx.HLE
public unsafe byte ReadByte(long position)
{
return *((byte*)(_ramPtr + position));
return *(_ramPtr + position);
}
public unsafe ushort ReadUInt16(long position)
@ -80,7 +80,7 @@ namespace Ryujinx.HLE
public unsafe void WriteByte(long position, byte value)
{
*((byte*)(_ramPtr + position)) = value;
*(_ramPtr + position) = value;
}
public unsafe void WriteUInt16(long position, ushort value)

View file

@ -502,7 +502,7 @@ namespace Ryujinx.HLE.HOS
{
IExecutable staticObject = isNro
? (IExecutable)new NxRelocatableObject(input)
: (IExecutable)new NxStaticObject(input);
: new NxStaticObject(input);
ProgramLoader.LoadStaticObjects(this, metaData, new IExecutable[] { staticObject });
}

View file

@ -72,7 +72,7 @@ namespace Ryujinx.HLE.HOS.Ipc
if (HasPId)
{
writer.Write((long)PId);
writer.Write(PId);
}
foreach (int handle in ToCopy)

View file

@ -83,7 +83,7 @@ namespace Ryujinx.HLE.HOS.Kernel
_activeSlotsCount++;
handle = (int)((_idCounter << 15) & (uint)0xffff8000) | entry.Index;
handle = (int)((_idCounter << 15) & 0xffff8000) | entry.Index;
if ((short)(_idCounter + 1) >= 0)
{

View file

@ -86,7 +86,7 @@ namespace Ryujinx.HLE.HOS.Services.Pl
{
int offset = (int)type * 4;
if (!AddFontToOrderOfPriorityList(context, (SharedFontType)type, offset))
if (!AddFontToOrderOfPriorityList(context, type, offset))
{
break;
}