diff options
author | Max Kellermann <max@musicpd.org> | 2018-08-20 16:49:14 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-08-20 16:49:14 +0200 |
commit | 5487d40be92d0944f44621c0bd4568ee5d66701f (patch) | |
tree | 54110860d5e94fa193e105b5d64ed1bbb326b4d3 /src/system/FileDescriptor.hxx | |
parent | 5e512763d3ff9d53034e146b3a876014ad717b94 (diff) |
system/FileDescriptor: add operator!=
Diffstat (limited to 'src/system/FileDescriptor.hxx')
-rw-r--r-- | src/system/FileDescriptor.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/system/FileDescriptor.hxx b/src/system/FileDescriptor.hxx index ff42efc32..b4294c246 100644 --- a/src/system/FileDescriptor.hxx +++ b/src/system/FileDescriptor.hxx @@ -65,6 +65,10 @@ public: return fd == other.fd; } + constexpr bool operator!=(FileDescriptor other) const noexcept { + return !(*this == other); + } + constexpr bool IsDefined() const noexcept { return fd >= 0; } |