From 1b5dfe437ad88a806d964693425c728187accff5 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 22 Aug 2018 21:32:43 +1000 Subject: [PATCH] posix/fd: make dup const It's not strictly semantically correct, but it greatly simplifies reference parameter binding in win32 memory mapping --- posix/fd.cpp | 2 +- posix/fd.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/posix/fd.cpp b/posix/fd.cpp index d8e08865..091916f0 100644 --- a/posix/fd.cpp +++ b/posix/fd.cpp @@ -65,7 +65,7 @@ fd::fd (int _fd): /////////////////////////////////////////////////////////////////////////////// fd -fd::dup (void) +fd::dup (void) const { return dup (m_fd); } diff --git a/posix/fd.hpp b/posix/fd.hpp index d7cf888f..8e59b0e8 100644 --- a/posix/fd.hpp +++ b/posix/fd.hpp @@ -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 ();