Loading adb/types.h +4 −6 Original line number Diff line number Diff line Loading @@ -42,14 +42,14 @@ struct Block { } Block(const Block& copy) = delete; Block(Block&& move) { Block(Block&& move) noexcept { std::swap(data_, move.data_); std::swap(capacity_, move.capacity_); std::swap(size_, move.size_); } Block& operator=(const Block& copy) = delete; Block& operator=(Block&& move) { Block& operator=(Block&& move) noexcept { clear(); std::swap(data_, move.data_); Loading Loading @@ -147,12 +147,10 @@ struct IOVector { } IOVector(const IOVector& copy) = delete; IOVector(IOVector&& move) : IOVector() { *this = std::move(move); } IOVector(IOVector&& move) noexcept : IOVector() { *this = std::move(move); } IOVector& operator=(const IOVector& copy) = delete; IOVector& operator=(IOVector&& move) { IOVector& operator=(IOVector&& move) noexcept { chain_ = std::move(move.chain_); chain_length_ = move.chain_length_; begin_offset_ = move.begin_offset_; Loading base/include/android-base/scopeguard.h +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ class ScopeGuard { public: ScopeGuard(F&& f) : f_(std::forward<F>(f)), active_(true) {} ScopeGuard(ScopeGuard&& that) : f_(std::move(that.f_)), active_(that.active_) { ScopeGuard(ScopeGuard&& that) noexcept : f_(std::move(that.f_)), active_(that.active_) { that.active_ = false; } Loading base/include/android-base/unique_fd.h +2 −2 Original line number Diff line number Diff line Loading @@ -90,8 +90,8 @@ class unique_fd_impl final { explicit unique_fd_impl(int fd) { reset(fd); } ~unique_fd_impl() { reset(); } unique_fd_impl(unique_fd_impl&& other) { reset(other.release()); } unique_fd_impl& operator=(unique_fd_impl&& s) { unique_fd_impl(unique_fd_impl&& other) noexcept { reset(other.release()); } unique_fd_impl& operator=(unique_fd_impl&& s) noexcept { int fd = s.fd_; s.fd_ = -1; reset(fd, &s); Loading fs_mgr/libdm/dm_test.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -59,7 +59,8 @@ class TempDevice { : dm_(DeviceMapper::Instance()), name_(name), valid_(false) { valid_ = dm_.CreateDevice(name, table); } TempDevice(TempDevice&& other) : dm_(other.dm_), name_(other.name_), valid_(other.valid_) { TempDevice(TempDevice&& other) noexcept : dm_(other.dm_), name_(other.name_), valid_(other.valid_) { other.valid_ = false; } ~TempDevice() { Loading Loading @@ -103,7 +104,7 @@ class TempDevice { TempDevice(const TempDevice&) = delete; TempDevice& operator=(const TempDevice&) = delete; TempDevice& operator=(TempDevice&& other) { TempDevice& operator=(TempDevice&& other) noexcept { name_ = other.name_; valid_ = other.valid_; other.valid_ = false; Loading init/keychords_test.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -47,9 +47,9 @@ class EventHandler { public: EventHandler(); EventHandler(const EventHandler&) = delete; EventHandler(EventHandler&&); EventHandler(EventHandler&&) noexcept; EventHandler& operator=(const EventHandler&) = delete; EventHandler& operator=(EventHandler&&); EventHandler& operator=(EventHandler&&) noexcept; ~EventHandler() noexcept; bool init(); Loading @@ -64,11 +64,11 @@ class EventHandler { EventHandler::EventHandler() : fd_(-1) {} EventHandler::EventHandler(EventHandler&& rval) : fd_(rval.fd_) { EventHandler::EventHandler(EventHandler&& rval) noexcept : fd_(rval.fd_) { rval.fd_ = -1; } EventHandler& EventHandler::operator=(EventHandler&& rval) { EventHandler& EventHandler::operator=(EventHandler&& rval) noexcept { fd_ = rval.fd_; rval.fd_ = -1; return *this; Loading Loading
adb/types.h +4 −6 Original line number Diff line number Diff line Loading @@ -42,14 +42,14 @@ struct Block { } Block(const Block& copy) = delete; Block(Block&& move) { Block(Block&& move) noexcept { std::swap(data_, move.data_); std::swap(capacity_, move.capacity_); std::swap(size_, move.size_); } Block& operator=(const Block& copy) = delete; Block& operator=(Block&& move) { Block& operator=(Block&& move) noexcept { clear(); std::swap(data_, move.data_); Loading Loading @@ -147,12 +147,10 @@ struct IOVector { } IOVector(const IOVector& copy) = delete; IOVector(IOVector&& move) : IOVector() { *this = std::move(move); } IOVector(IOVector&& move) noexcept : IOVector() { *this = std::move(move); } IOVector& operator=(const IOVector& copy) = delete; IOVector& operator=(IOVector&& move) { IOVector& operator=(IOVector&& move) noexcept { chain_ = std::move(move.chain_); chain_length_ = move.chain_length_; begin_offset_ = move.begin_offset_; Loading
base/include/android-base/scopeguard.h +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ class ScopeGuard { public: ScopeGuard(F&& f) : f_(std::forward<F>(f)), active_(true) {} ScopeGuard(ScopeGuard&& that) : f_(std::move(that.f_)), active_(that.active_) { ScopeGuard(ScopeGuard&& that) noexcept : f_(std::move(that.f_)), active_(that.active_) { that.active_ = false; } Loading
base/include/android-base/unique_fd.h +2 −2 Original line number Diff line number Diff line Loading @@ -90,8 +90,8 @@ class unique_fd_impl final { explicit unique_fd_impl(int fd) { reset(fd); } ~unique_fd_impl() { reset(); } unique_fd_impl(unique_fd_impl&& other) { reset(other.release()); } unique_fd_impl& operator=(unique_fd_impl&& s) { unique_fd_impl(unique_fd_impl&& other) noexcept { reset(other.release()); } unique_fd_impl& operator=(unique_fd_impl&& s) noexcept { int fd = s.fd_; s.fd_ = -1; reset(fd, &s); Loading
fs_mgr/libdm/dm_test.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -59,7 +59,8 @@ class TempDevice { : dm_(DeviceMapper::Instance()), name_(name), valid_(false) { valid_ = dm_.CreateDevice(name, table); } TempDevice(TempDevice&& other) : dm_(other.dm_), name_(other.name_), valid_(other.valid_) { TempDevice(TempDevice&& other) noexcept : dm_(other.dm_), name_(other.name_), valid_(other.valid_) { other.valid_ = false; } ~TempDevice() { Loading Loading @@ -103,7 +104,7 @@ class TempDevice { TempDevice(const TempDevice&) = delete; TempDevice& operator=(const TempDevice&) = delete; TempDevice& operator=(TempDevice&& other) { TempDevice& operator=(TempDevice&& other) noexcept { name_ = other.name_; valid_ = other.valid_; other.valid_ = false; Loading
init/keychords_test.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -47,9 +47,9 @@ class EventHandler { public: EventHandler(); EventHandler(const EventHandler&) = delete; EventHandler(EventHandler&&); EventHandler(EventHandler&&) noexcept; EventHandler& operator=(const EventHandler&) = delete; EventHandler& operator=(EventHandler&&); EventHandler& operator=(EventHandler&&) noexcept; ~EventHandler() noexcept; bool init(); Loading @@ -64,11 +64,11 @@ class EventHandler { EventHandler::EventHandler() : fd_(-1) {} EventHandler::EventHandler(EventHandler&& rval) : fd_(rval.fd_) { EventHandler::EventHandler(EventHandler&& rval) noexcept : fd_(rval.fd_) { rval.fd_ = -1; } EventHandler& EventHandler::operator=(EventHandler&& rval) { EventHandler& EventHandler::operator=(EventHandler&& rval) noexcept { fd_ = rval.fd_; rval.fd_ = -1; return *this; Loading