util/ForeignFifoBuffer: import std::swap()

This commit is contained in:
Max Kellermann 2019-08-16 09:55:49 +02:00 committed by Max Kellermann
parent 1550113506
commit 57c5603122

View File

@ -83,10 +83,11 @@ public:
} }
void Swap(ForeignFifoBuffer<T> &other) noexcept { void Swap(ForeignFifoBuffer<T> &other) noexcept {
std::swap(head, other.head); using std::swap;
std::swap(tail, other.tail); swap(head, other.head);
std::swap(capacity, other.capacity); swap(tail, other.tail);
std::swap(data, other.data); swap(capacity, other.capacity);
swap(data, other.data);
} }
constexpr bool IsNull() const noexcept { constexpr bool IsNull() const noexcept {