summaryrefslogtreecommitdiff
path: root/src/system
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-08-20 16:49:14 +0200
committerMax Kellermann <max@musicpd.org>2018-08-20 16:49:14 +0200
commit5487d40be92d0944f44621c0bd4568ee5d66701f (patch)
tree54110860d5e94fa193e105b5d64ed1bbb326b4d3 /src/system
parent5e512763d3ff9d53034e146b3a876014ad717b94 (diff)
system/FileDescriptor: add operator!=
Diffstat (limited to 'src/system')
-rw-r--r--src/system/FileDescriptor.hxx4
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;
}