Update Queue to allow for null values to be added

This commit is contained in:
Luke Else 2022-04-19 21:31:29 +01:00
parent a4dfb0f58a
commit d4291ab9ec

View File

@ -12,7 +12,7 @@
return new Queue<T>();
}
public static Queue<T> Create(T value)
public static Queue<T> Create(T? value)
{
//Create a new Queue with a head + tail
QueueNode<T> newNode = QueueNode<T>.Create(value, default);
@ -24,7 +24,7 @@
};
}
public void Push(T value)
public void Push(T? value)
{
//Add an Item to the end of the Queue
Count++;