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

Commit de62e6eb authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "GraphicsBuffer: comparison operators"

parents 97d06963 672222b3
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -123,6 +123,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;