fix compile error
This commit is contained in:
parent
23fa396683
commit
1370afee94
|
|
@ -73,6 +73,26 @@ public:
|
|||
that._size = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Move assignment operator
|
||||
* @param that
|
||||
*/
|
||||
TcpBuffer &operator=(TcpBuffer &&that)
|
||||
{
|
||||
// skip self-assignment
|
||||
if (this == &that) return *this;
|
||||
|
||||
// swap buffers
|
||||
_buffers.swap(that._buffers);
|
||||
|
||||
// swap integers
|
||||
std::swap(_skip, that._skip);
|
||||
std::swap(_size, that._size);
|
||||
|
||||
// done
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Does the buffer exist (is it non-empty)
|
||||
* @return bool
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ public:
|
|||
buffer.shrink(processed);
|
||||
|
||||
// restore the buffer as member
|
||||
_in = std::move(buffer);
|
||||
std::swap(_in, buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue