mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-02-16 15:17:18 +02:00
FdSource: Fix operator =
This wasn't moving the underlying buffer, so if the buffer was non-empty, it could lose data.
This commit is contained in:
parent
d231d802f5
commit
fa7aa0389a
1 changed files with 1 additions and 7 deletions
|
@ -159,13 +159,7 @@ struct FdSource : BufferedSource
|
|||
FdSource(Descriptor fd) : fd(fd) { }
|
||||
FdSource(FdSource &&) = default;
|
||||
|
||||
FdSource & operator=(FdSource && s)
|
||||
{
|
||||
fd = s.fd;
|
||||
s.fd = INVALID_DESCRIPTOR;
|
||||
read = s.read;
|
||||
return *this;
|
||||
}
|
||||
FdSource & operator=(FdSource && s) = default;
|
||||
|
||||
bool good() override;
|
||||
protected:
|
||||
|
|
Loading…
Add table
Reference in a new issue