Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/Build/Logging/SerialConsoleLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ internal enum FrameType
internal struct Frame
{
/// <summary>
/// Creates a new instance of frame with all fields specified.
/// Initializes a new instance of the <see cref="Frame"/> struct with all fields specified.
/// </summary>
/// <param name="t">the type of the this frame</param>
/// <param name="d">display state. true indicates this frame has been displayed to the user</param>
Expand Down Expand Up @@ -907,14 +907,14 @@ internal class FrameStack
/// The frames member is contained by FrameStack and does
/// all the heavy lifting for FrameStack.
/// </summary>
private System.Collections.Stack _frames;
private readonly Stack<Frame> _frames;

/// <summary>
/// Create a new, empty, FrameStack.
/// Initializes a new instance of the <see cref="FrameStack"/> class.
/// </summary>
internal FrameStack()
{
_frames = new System.Collections.Stack();
_frames = new Stack<Frame>();
}

/// <summary>
Expand All @@ -923,15 +923,15 @@ internal FrameStack()
/// <exception cref="InvalidOperationException">Thrown when stack is empty.</exception>
internal Frame Pop()
{
return (Frame)(_frames.Pop());
return _frames.Pop();
}

/// <summary>
/// Returns, but does not remove, the top of the stack.
/// </summary>
internal Frame Peek()
{
return (Frame)(_frames.Peek());
return _frames.Peek();
}

/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions src/Tasks/ParserState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;

#nullable disable

Expand All @@ -19,7 +19,7 @@ internal sealed class ParseState
private int _openConditionalDirectives;

// A stack of namespaces so that nested namespaces can be supported.
private readonly Stack _namespaceStack = new Stack();
private readonly Stack<string> _namespaceStack = new Stack<string>();

internal ParseState()
{
Expand Down Expand Up @@ -90,7 +90,7 @@ internal string PopNamespacePart()
return null;
}

return (string)_namespaceStack.Pop();
return _namespaceStack.Pop();
}

/// <summary>
Expand Down