Add noexcept to move constructors and assignment operators.

Bug: 116614593
Test: build with WITH_TIDY=1
Change-Id: Ib50ced82d650737cf99a9757133119945a3409f3
This commit is contained in:
Chih-Hung Hsieh
2018-09-25 12:01:51 -07:00
committed by Chih-hung Hsieh
parent dc4f6c49e8
commit 19a5da4c13

View File

@@ -46,7 +46,7 @@ class AuthorizationSet {
AuthorizationSet(const AuthorizationSet& other) : data_(other.data_) {}
// Move constructor.
AuthorizationSet(AuthorizationSet&& other) : data_(std::move(other.data_)) {}
AuthorizationSet(AuthorizationSet&& other) noexcept : data_(std::move(other.data_)) {}
// Constructor from hidl_vec<KeyParameter>
AuthorizationSet(const hidl_vec<KeyParameter>& other) { *this = other; }
@@ -58,7 +58,7 @@ class AuthorizationSet {
}
// Move assignment.
AuthorizationSet& operator=(AuthorizationSet&& other) {
AuthorizationSet& operator=(AuthorizationSet&& other) noexcept {
data_ = std::move(other.data_);
return *this;
}