Skip to content

Commit

Permalink
Fix new diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink committed Aug 13, 2024
1 parent 35d8001 commit 0c5c5ae
Show file tree
Hide file tree
Showing 15 changed files with 1,313 additions and 1,324 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,38 @@

#pragma warning disable CA1710 // Rename Microsoft.CodeAnalysis.ArrayBuilder<T> to end in 'Collection'.

namespace Analyzer.Utilities.PooledObjects
namespace Analyzer.Utilities.PooledObjects;

internal partial class ArrayBuilder<T>
{
internal partial class ArrayBuilder<T>
/// <summary>
/// struct enumerator used in foreach.
/// </summary>
internal struct Enumerator : IEnumerator<T>
{
/// <summary>
/// struct enumerator used in foreach.
/// </summary>
internal struct Enumerator : IEnumerator<T>
{
private readonly ArrayBuilder<T> _builder;
private int _index;
private readonly ArrayBuilder<T> _builder;
private int _index;

public Enumerator(ArrayBuilder<T> builder)
{
_builder = builder;
_index = -1;
}
public Enumerator(ArrayBuilder<T> builder)
{
_builder = builder;
_index = -1;
}

public readonly T Current => _builder[_index];
public readonly T Current => _builder[_index];

public bool MoveNext()
{
_index++;
return _index < _builder.Count;
}
public bool MoveNext()
{
_index++;
return _index < _builder.Count;
}

public readonly void Dispose()
{
}
public readonly void Dispose()
{
}

readonly object? System.Collections.IEnumerator.Current => Current;
readonly object? System.Collections.IEnumerator.Current => Current;

public void Reset() => _index = -1;
}
public void Reset() => _index = -1;
}
}
Loading

0 comments on commit 0c5c5ae

Please sign in to comment.