diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:36:23 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:46:02 -0500 |
commit | c583a2520616c2736cffc389c89a48b159366e6c (patch) | |
tree | b4925f26506fcee96c16119431c01760f05db95d /gdbsupport/scoped_fd.h | |
parent | ca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff) | |
download | gdb-users/simark/clang-format.zip gdb-users/simark/clang-format.tar.gz gdb-users/simark/clang-format.tar.bz2 |
Run clang-format.shusers/simark/clang-format
Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968
Diffstat (limited to 'gdbsupport/scoped_fd.h')
-rw-r--r-- | gdbsupport/scoped_fd.h | 16 |
1 files changed, 6 insertions, 10 deletions
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; |