fd: remove const from members that modify fd state

This commit is contained in:
Danny Robson 2018-02-01 13:47:14 +11:00
parent 35e3f69ad2
commit fd03c344b2
3 changed files with 4 additions and 4 deletions

View File

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

View File

@ -47,7 +47,7 @@ namespace util::posix {
// possible; one should not be doing this unless it is absolutely // possible; one should not be doing this unless it is absolutely
// required. // required.
fd (const fd&) = delete; fd (const fd&) = delete;
fd dup (void) const; fd dup (void);
static fd dup (int); static fd dup (int);
~fd (); ~fd ();
@ -111,7 +111,7 @@ namespace util::posix {
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
operator int (void) const; operator int (void) const;
int native (void) { return m_fd; } int native (void) const { return m_fd; }
private: private:
int m_fd; int m_fd;

View File

@ -20,7 +20,6 @@ main (void)
const point2f r { 0.f, 1.f }; const point2f r { 0.f, 1.f };
tap.expect_eq (q, r, "redim to lower dimension"); tap.expect_eq (q, r, "redim to lower dimension");
} }
// Redim to higher dimension without fill // Redim to higher dimension without fill
@ -30,6 +29,7 @@ main (void)
// GCC: we can't use the equality operator here because it triggers // GCC: we can't use the equality operator here because it triggers
// an ICE on GCC 7.1.0 // an ICE on GCC 7.1.0
tap.expect ( tap.expect (
std::equal (std::cbegin (p), std::cend (p), std::cbegin (q)), std::equal (std::cbegin (p), std::cend (p), std::cbegin (q)),
"redim to higher dimension" "redim to higher dimension"