mirror of
https://github.com/xfarrow/lasd.git
synced 2025-06-05 21:49:14 +02:00
Library 3
This commit is contained in:
@ -37,7 +37,7 @@ QueueVec<Data>::QueueVec(const QueueVec& toCopy){
|
||||
|
||||
template <typename Data>
|
||||
QueueVec<Data>::QueueVec(QueueVec&& toMove) noexcept{
|
||||
Clear();
|
||||
Clear(); // the moved Queue will be in a consistent state
|
||||
std::swap(Elements, toMove.Elements);
|
||||
std::swap(rear, toMove.rear);
|
||||
std::swap(front, toMove.front);
|
||||
@ -140,7 +140,7 @@ bool QueueVec<Data>::Empty() const noexcept{
|
||||
|
||||
template <typename Data>
|
||||
ulong QueueVec<Data>::Size() const noexcept{
|
||||
//if(size == 0) return 0; // this won't ever get executed, it's here just in case
|
||||
//if(size == 0) return 0; // this won't ever get executed, it's here just in case
|
||||
return ((rear + size) - front) % size;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user