util/ForeignFifoBuffer: add method Swap()
This commit is contained in:
parent
2beb763b4f
commit
cf16d81fa4
|
@ -82,6 +82,13 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
void Swap(ForeignFifoBuffer<T> &other) {
|
||||
std::swap(head, other.head);
|
||||
std::swap(tail, other.tail);
|
||||
std::swap(capacity, other.capacity);
|
||||
std::swap(data, other.data);
|
||||
}
|
||||
|
||||
constexpr bool IsNull() const {
|
||||
return data == nullptr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue