Add noexcept to move constructors and assignment operators.
authorChih-Hung Hsieh <chh@google.com>
Tue, 25 Sep 2018 19:01:51 +0000 (12:01 -0700)
committerChih-hung Hsieh <chh@google.com>
Mon, 1 Oct 2018 20:30:38 +0000 (20:30 +0000)
Bug: 116614593
Test: build with WITH_TIDY=1
Change-Id: Ib50ced82d650737cf99a9757133119945a3409f3

keymaster/4.0/support/include/keymasterV4_0/authorization_set.h

index 18696829db2657a652de5783f8e95622c5a568b7..193e4ea25eb8c16c88738154fb9c12338be64e7a 100644 (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;
     }