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

Commit 2c3839cf authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "GraphicsBuffer: comparison operators" am: de62e6eb

parents 6952b999 de62e6eb
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -123,6 +123,13 @@ public:
    inline AHardwareBuffer* _Nullable get() const { return mBuffer; }
    inline AHardwareBuffer* _Nullable get() const { return mBuffer; }
    inline explicit operator bool () const { return mBuffer != nullptr; }
    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 {
    HardwareBuffer& operator=(HardwareBuffer&& other) noexcept {
        reset(other.release());
        reset(other.release());
        return *this;
        return *this;