Remove redundant `unsafe` from a couple classes

This commit is contained in:
YoshiRulz 2025-04-24 01:01:43 +10:00
parent 8931f05703
commit b4cb0b7612
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 5 additions and 3 deletions

View File

@ -135,7 +135,7 @@ namespace BizHawk.Bizware.Audio
public override void Write(byte[] buffer, int offset, int count) public override void Write(byte[] buffer, int offset, int count)
=> throw new NotSupportedException(); => throw new NotSupportedException();
private unsafe class SDLRwOpsStreamWrapper : IDisposable private sealed class SDLRwOpsStreamWrapper : IDisposable
{ {
public IntPtr Rw { get; private set; } public IntPtr Rw { get; private set; }
private readonly Stream _s; private readonly Stream _s;
@ -146,7 +146,7 @@ namespace BizHawk.Bizware.Audio
private readonly SDLRWopsWriteCallback _writeCallback; private readonly SDLRWopsWriteCallback _writeCallback;
private readonly SDLRWopsCloseCallback _closeCallback; private readonly SDLRWopsCloseCallback _closeCallback;
public SDLRwOpsStreamWrapper(Stream s) public unsafe SDLRwOpsStreamWrapper(Stream s)
{ {
Rw = SDL_AllocRW(); Rw = SDL_AllocRW();
if (Rw == IntPtr.Zero) if (Rw == IntPtr.Zero)

View File

@ -9,7 +9,7 @@ using BizHawk.Common.BufferExtensions;
namespace BizHawk.Common namespace BizHawk.Common
{ {
public unsafe class Serializer public class Serializer
{ {
public Serializer() { } public Serializer() { }
@ -821,6 +821,7 @@ namespace BizHawk.Common
return _currSection.Items.ContainsKey(key); return _currSection.Items.ContainsKey(key);
} }
#if false
private void SyncBuffer(string name, int elemsize, int len, void* ptr) private void SyncBuffer(string name, int elemsize, int len, void* ptr)
{ {
if (IsReader) if (IsReader)
@ -838,6 +839,7 @@ namespace BizHawk.Common
Sync(name, ref temp, false); Sync(name, ref temp, false);
} }
} }
#endif
private void SyncText(string name, ref byte val) private void SyncText(string name, ref byte val)
{ {