From c583a2520616c2736cffc389c89a48b159366e6c Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 8 Feb 2023 15:36:23 -0500 Subject: Run clang-format.sh Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968 --- gdbsupport/scoped_fd.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'gdbsupport/scoped_fd.h') diff --git a/gdbsupport/scoped_fd.h b/gdbsupport/scoped_fd.h index 6c0d4af..80d3082 100644 --- a/gdbsupport/scoped_fd.h +++ b/gdbsupport/scoped_fd.h @@ -30,8 +30,7 @@ class scoped_fd public: explicit scoped_fd (int fd = -1) noexcept : m_fd (fd) {} - scoped_fd (scoped_fd &&other) noexcept - : m_fd (other.m_fd) + scoped_fd (scoped_fd &&other) noexcept : m_fd (other.m_fd) { other.m_fd = -1; } @@ -46,10 +45,10 @@ public: { if (m_fd != other.m_fd) { - if (m_fd >= 0) - close (m_fd); - m_fd = other.m_fd; - other.m_fd = -1; + if (m_fd >= 0) + close (m_fd); + m_fd = other.m_fd; + other.m_fd = -1; } return *this; } @@ -75,10 +74,7 @@ public: return result; } - int get () const noexcept - { - return m_fd; - } + int get () const noexcept { return m_fd; } private: int m_fd; -- cgit v1.1