From 7d160e98fde05e0b9b542dc04ea72dc34994bc5b Mon Sep 17 00:00:00 2001
From: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Sat, 24 Jun 2023 02:46:04 +0200
Subject: MemoryManagement: Change return types for Commit/Decommit to void
(#5325)
* Replace return type with void for Commit/Decommit
* Small cleanup
---
src/Ryujinx.Memory/MemoryBlock.cs | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
(limited to 'src/Ryujinx.Memory/MemoryBlock.cs')
diff --git a/src/Ryujinx.Memory/MemoryBlock.cs b/src/Ryujinx.Memory/MemoryBlock.cs
index 885ef456..2cf04628 100644
--- a/src/Ryujinx.Memory/MemoryBlock.cs
+++ b/src/Ryujinx.Memory/MemoryBlock.cs
@@ -1,6 +1,5 @@
using System;
using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
using System.Threading;
namespace Ryujinx.Memory
@@ -101,12 +100,12 @@ namespace Ryujinx.Memory
///
/// Starting offset of the range to be committed
/// Size of the range to be committed
- /// True if the operation was successful, false otherwise
+ /// Throw when the operation was not successful
/// Throw when the memory block has already been disposed
/// Throw when either or are out of range
- public bool Commit(ulong offset, ulong size)
+ public void Commit(ulong offset, ulong size)
{
- return MemoryManagement.Commit(GetPointerInternal(offset, size), size, _forJit);
+ MemoryManagement.Commit(GetPointerInternal(offset, size), size, _forJit);
}
///
@@ -115,12 +114,12 @@ namespace Ryujinx.Memory
///
/// Starting offset of the range to be decommitted
/// Size of the range to be decommitted
- /// True if the operation was successful, false otherwise
+ /// Throw when the operation was not successful
/// Throw when the memory block has already been disposed
/// Throw when either or are out of range
- public bool Decommit(ulong offset, ulong size)
+ public void Decommit(ulong offset, ulong size)
{
- return MemoryManagement.Decommit(GetPointerInternal(offset, size), size);
+ MemoryManagement.Decommit(GetPointerInternal(offset, size), size);
}
///
--
cgit v1.2.3