posix/fd: make dup const

It's not strictly semantically correct, but it greatly simplifies reference
parameter binding in win32 memory mapping
This commit is contained in:
Danny Robson 2018-08-22 21:32:43 +10:00
parent 4b30235164
commit 1b5dfe437a
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ fd::fd (int _fd):
///////////////////////////////////////////////////////////////////////////////
fd
fd::dup (void)
fd::dup (void) const
{
return dup (m_fd);
}

View File

@ -40,7 +40,7 @@ namespace cruft::posix {
// possible; one should not be doing this unless it is absolutely
// required.
fd (const fd&) = delete;
fd dup (void);
fd dup (void) const;
static fd dup (int);
~fd ();