Skip to content

Commit

Permalink
Remove outdated type restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueRaja committed Feb 27, 2021
1 parent cdd7e25 commit 2a40f66
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion Priority Queue/GenericPriorityQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace Priority_Queue
/// <typeparam name="TPriority">The priority-type. Must extend IComparable&lt;TPriority&gt;</typeparam>
public sealed class GenericPriorityQueue<TItem, TPriority> : IFixedSizePriorityQueue<TItem, TPriority>
where TItem : GenericPriorityQueueNode<TPriority>
where TPriority : IComparable<TPriority>
{
private int _numNodes;
private TItem[] _nodes;
Expand Down
1 change: 0 additions & 1 deletion Priority Queue/IFixedSizePriorityQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ namespace Priority_Queue
/// A helper-interface only needed to make writing unit tests a bit easier (hence the 'internal' access modifier)
/// </summary>
internal interface IFixedSizePriorityQueue<TItem, in TPriority> : IPriorityQueue<TItem, TPriority>
where TPriority : IComparable<TPriority>
{
/// <summary>
/// Resize the queue so it can accept more nodes. All currently enqueued nodes are remain.
Expand Down
1 change: 0 additions & 1 deletion Priority Queue/IPriorityQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ namespace Priority_Queue
/// (theoretically?) optimize method calls from concrete-types slightly better.
/// </summary>
public interface IPriorityQueue<TItem, in TPriority> : IEnumerable<TItem>
where TPriority : IComparable<TPriority>
{
/// <summary>
/// Enqueue a node to the priority queue. Lower values are placed in front. Ties are broken by first-in-first-out.
Expand Down
1 change: 0 additions & 1 deletion Priority Queue/SimplePriorityQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace Priority_Queue
/// <typeparam name="TItem">The type to enqueue</typeparam>
/// <typeparam name="TPriority">The priority-type to use for nodes. Must extend IComparable&lt;TPriority&gt;</typeparam>
public class SimplePriorityQueue<TItem, TPriority> : IPriorityQueue<TItem, TPriority>
where TPriority : IComparable<TPriority>
{
private class SimpleNode : GenericPriorityQueueNode<TPriority>
{
Expand Down

0 comments on commit 2a40f66

Please sign in to comment.