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

Commit 7d3d8a3e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "GraphicsBuffer: comparison operators"

parents 8d9be529 2d466008
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -119,6 +119,13 @@ public:
    inline AHardwareBuffer* _Nullable get() const { return mBuffer; }
    inline explicit operator bool () const { return mBuffer != nullptr; }

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

    HardwareBuffer& operator=(HardwareBuffer&& other) noexcept {
        reset(other.release());
        return *this;