This commit is contained in:
ikpil 2024-02-04 12:42:34 +09:00
parent 2dc8593c78
commit 94ed3d646c
11 changed files with 21 additions and 21 deletions

View File

@ -34,14 +34,14 @@ namespace DotRecast.Core.Buffers
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
return _array[index];
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
set
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
_array[index] = value;
}
}

View File

@ -144,7 +144,7 @@ namespace DotRecast.Core.Collections
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
return index switch
{
@ -282,7 +282,7 @@ namespace DotRecast.Core.Collections
set
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
switch (index)
{

View File

@ -32,7 +32,7 @@ namespace DotRecast.Core.Collections
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
return index switch
{
@ -58,7 +58,7 @@ namespace DotRecast.Core.Collections
set
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
switch (index)
{

View File

@ -18,7 +18,7 @@ namespace DotRecast.Core.Collections
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
return index switch
{
@ -30,7 +30,7 @@ namespace DotRecast.Core.Collections
set
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
switch (index)
{

View File

@ -272,7 +272,7 @@ namespace DotRecast.Core.Collections
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
return index switch
{
@ -538,7 +538,7 @@ namespace DotRecast.Core.Collections
set
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
switch (index)
{

View File

@ -48,7 +48,7 @@ namespace DotRecast.Core.Collections
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
return index switch
{
@ -90,7 +90,7 @@ namespace DotRecast.Core.Collections
set
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
switch (index)
{

View File

@ -20,7 +20,7 @@ namespace DotRecast.Core.Collections
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
return index switch
{
@ -34,7 +34,7 @@ namespace DotRecast.Core.Collections
set
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
switch (index)
{

View File

@ -528,7 +528,7 @@ namespace DotRecast.Core.Collections
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
return index switch
{
@ -1051,7 +1051,7 @@ namespace DotRecast.Core.Collections
set
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
switch (index)
{

View File

@ -80,7 +80,7 @@ namespace DotRecast.Core.Collections
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
return index switch
{
@ -154,7 +154,7 @@ namespace DotRecast.Core.Collections
set
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
switch (index)
{

View File

@ -24,7 +24,7 @@ namespace DotRecast.Core.Collections
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
return index switch
{
@ -42,7 +42,7 @@ namespace DotRecast.Core.Collections
set
{
ThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
RcThrowHelper.ThrowExceptionIfIndexOutOfRange(index, Length);
switch (index)
{

View File

@ -4,7 +4,7 @@ using DotRecast.Core.Collections;
namespace DotRecast.Core
{
public static class ThrowHelper
public static class RcThrowHelper
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ThrowExceptionIfIndexOutOfRange(int index, int size)