Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b5c8c32 authored by Steven Moreland's avatar Steven Moreland Committed by Gerrit Code Review
Browse files

Merge "libbinder_ndk: nice dup operator"

parents 804d6c02 f7dc94f6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -365,6 +365,8 @@ class ScopedFileDescriptor : public impl::ScopedAResource<int, internal::closeWi
    ScopedFileDescriptor(ScopedFileDescriptor&&) = default;
    ScopedFileDescriptor& operator=(ScopedFileDescriptor&&) = default;

    ScopedFileDescriptor dup() const { return ScopedFileDescriptor(::dup(get())); }

    bool operator!=(const ScopedFileDescriptor& rhs) const { return get() != rhs.get(); }
    bool operator<(const ScopedFileDescriptor& rhs) const { return get() < rhs.get(); }
    bool operator<=(const ScopedFileDescriptor& rhs) const { return get() <= rhs.get(); }