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

gugelfrei
Chih-hung Hsieh 6 years ago committed by Gerrit Code Review
commit a499844d1c

@ -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);

@ -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;

@ -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);
}

@ -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) {}

Loading…
Cancel
Save