FileDescriptor: add operator=() so that the fcntl(F_DUPFD syscall compiles :)
This commit is contained in:
parent
5c61252061
commit
36bb1cab5c
@ -43,6 +43,8 @@ struct Descriptor
|
|||||||
Descriptor(const Descriptor& other);
|
Descriptor(const Descriptor& other);
|
||||||
Descriptor();
|
Descriptor();
|
||||||
|
|
||||||
|
const Descriptor& operator=(const Descriptor& other);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_is_open;
|
bool m_is_open;
|
||||||
bool m_can_read;
|
bool m_can_read;
|
||||||
|
@ -41,3 +41,13 @@ int Descriptor::seek(long offset)
|
|||||||
m_offset = (uint64_t)offset;
|
m_offset = (uint64_t)offset;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Descriptor& Descriptor::operator=(const Descriptor& other)
|
||||||
|
{
|
||||||
|
m_is_open = other.m_is_open;
|
||||||
|
m_can_read = other.m_can_read;
|
||||||
|
m_can_write = other.m_can_write;
|
||||||
|
m_offset = other.m_offset;
|
||||||
|
m_node = other.m_node;
|
||||||
|
return other;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user