Fix and simplify EffectId hashing logic
このコミットが含まれているのは:
1 親
2c1ab945b2
コミット
fd62b28d82
2ファイル変更
+42
-81
検索条件に一致するファイルはありません
@@ -75,33 +75,6 @@ internal struct ImmutableArrayBuilder<T> : IDisposable
|
||||
this.writer!.AddRange(items);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Advances the current writer by the specified amount.
|
||||
/// </summary>
|
||||
/// <param name="count">The amoutn to advance by.</param>
|
||||
public readonly void Advance(int count)
|
||||
{
|
||||
this.writer!.Advance(count);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the array currently in use (rented from the pool).
|
||||
/// </summary>
|
||||
/// <returns>The array currently in use.</returns>
|
||||
public readonly T[] DangerousGetArray()
|
||||
{
|
||||
return this.writer!.DangerousGetArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ensures that the current instance has enough free space to contain a given number of new items.
|
||||
/// </summary>
|
||||
/// <param name="requestedSize">The minimum number of items to ensure space for.</param>
|
||||
public readonly void EnsureCapacity(int requestedSize)
|
||||
{
|
||||
this.writer!.EnsureCapacity(requestedSize);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inserts an item to the builder at the specified index.
|
||||
/// </summary>
|
||||
@@ -204,23 +177,6 @@ internal struct ImmutableArrayBuilder<T> : IDisposable
|
||||
this.index += items.Length;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ImmutableArrayBuilder{T}.Advance"/>
|
||||
public void Advance(int count)
|
||||
{
|
||||
if (count > this.array.Length - this.index)
|
||||
{
|
||||
ImmutableArrayBuilder.ThrowArgumentOutOfRangeExceptionForCount();
|
||||
}
|
||||
|
||||
this.index += count;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ImmutableArrayBuilder{T}.DangerousGetArray"/>
|
||||
public T[] DangerousGetArray()
|
||||
{
|
||||
return this.array;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ImmutableArrayBuilder{T}.Insert"/>
|
||||
public void Insert(int index, T item)
|
||||
{
|
||||
@@ -253,9 +209,12 @@ internal struct ImmutableArrayBuilder<T> : IDisposable
|
||||
this.index = 0;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ImmutableArrayBuilder{T}.EnsureCapacity"/>
|
||||
/// <summary>
|
||||
/// Ensures that <see cref="array"/> has enough free space to contain a given number of new items.
|
||||
/// </summary>
|
||||
/// <param name="requestedSize">The minimum number of items to ensure space for in <see cref="array"/>.</param>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void EnsureCapacity(int requestedSize)
|
||||
private void EnsureCapacity(int requestedSize)
|
||||
{
|
||||
if (requestedSize > this.array.Length - this.index)
|
||||
{
|
||||
@@ -294,12 +253,4 @@ file static class ImmutableArrayBuilder
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Throws an <see cref="ArgumentOutOfRangeException"/> for <c>"count"</c>.
|
||||
/// </summary>
|
||||
public static void ThrowArgumentOutOfRangeExceptionForCount()
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("count");
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする