Commit cf16d81f authored by Max Kellermann's avatar Max Kellermann

util/ForeignFifoBuffer: add method Swap()

parent 2beb763b
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment