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

Commit a499844d authored by Chih-hung Hsieh's avatar Chih-hung Hsieh Committed by Gerrit Code Review
Browse files

Merge "Add noexcept to move constructors and assignment operators."

parents 600fd56c cf8d9b47
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@ status_t OMXBuffer::readFromParcel(const Parcel *parcel) {
    return OK;
}

OMXBuffer& OMXBuffer::operator=(OMXBuffer&& source) {
OMXBuffer& OMXBuffer::operator=(OMXBuffer&& source) noexcept {
    mBufferType = std::move(source.mBufferType);
    mRangeOffset = std::move(source.mRangeOffset);
    mRangeLength = std::move(source.mRangeLength);
+1 −1
Original line number Diff line number Diff line
@@ -137,7 +137,7 @@ private:
    hidl_memory mHidlMemory;

    // Move assignment
    OMXBuffer &operator=(OMXBuffer&&);
    OMXBuffer &operator=(OMXBuffer&&) noexcept;

    // Deleted copy constructor and assignment.
    OMXBuffer(const OMXBuffer&) = delete;
+2 −2
Original line number Diff line number Diff line
@@ -774,7 +774,7 @@ public:
        /**
         * Move assignment operator.
         */
        Custom& operator=(Custom &&o) {
        Custom& operator=(Custom &&o) noexcept {
            if (&o != this) {
                if (this->used() && !this->clear()) {
                    __builtin_trap();
@@ -795,7 +795,7 @@ public:
        /**
         * Move constructor.
         */
        Custom(Custom &&o) : Custom() {
        Custom(Custom &&o) noexcept : Custom() {
            *this = std::move(o);
        }

+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ public:
    class Locked {
    public:
        inline Locked(Mutexed<T> &mParent);
        inline Locked(Locked &&from) :
        inline Locked(Locked &&from) noexcept :
            mLock(from.mLock),
            mTreasure(from.mTreasure),
            mLocked(from.mLocked) {}