summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-06-06 01:08:04 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-06-06 01:08:05 +0000
commitba8b9250111590995c3a5e5f1f63f220f1b70508 (patch)
treeef550646fab0ff376a7c494bc6f56ae5dd02c4bd
parente5f1e5a262091aa2b7241f9d8c3266021d82ef3b (diff)
parente8c36e1e36f26cbf1bb26a86bcf59c1fedbfab56 (diff)
downloadlibhidl-ba8b9250111590995c3a5e5f1f63f220f1b70508.tar.gz
Merge "Mark move constructor/assignment noexcept." into oc-dev
-rw-r--r--base/include/hidl/HidlSupport.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/base/include/hidl/HidlSupport.h b/base/include/hidl/HidlSupport.h
index d7c3b83..6807860 100644
--- a/base/include/hidl/HidlSupport.h
+++ b/base/include/hidl/HidlSupport.h
@@ -94,14 +94,14 @@ struct hidl_handle {
hidl_handle(const hidl_handle &other);
// move constructor.
- hidl_handle(hidl_handle &&other);
+ hidl_handle(hidl_handle &&other) noexcept;
// assignment operators
hidl_handle &operator=(const hidl_handle &other);
hidl_handle &operator=(const native_handle_t *native_handle);
- hidl_handle &operator=(hidl_handle &&other);
+ hidl_handle &operator=(hidl_handle &&other) noexcept;
void setTo(native_handle_t* handle, bool shouldOwn = false);
@@ -133,7 +133,7 @@ struct hidl_string {
hidl_string(const std::string &);
// move constructor.
- hidl_string(hidl_string &&);
+ hidl_string(hidl_string &&) noexcept;
const char *c_str() const;
size_t size() const;
@@ -146,7 +146,7 @@ struct hidl_string {
// copy from an std::string.
hidl_string &operator=(const std::string &);
// move assignment operator.
- hidl_string &operator=(hidl_string &&other);
+ hidl_string &operator=(hidl_string &&other) noexcept;
// cast to std::string.
operator std::string() const;
@@ -235,12 +235,12 @@ struct hidl_memory {
}
// move constructor
- hidl_memory(hidl_memory&& other) {
+ hidl_memory(hidl_memory&& other) noexcept {
*this = std::move(other);
}
// move assignment
- hidl_memory &operator=(hidl_memory &&other) {
+ hidl_memory &operator=(hidl_memory &&other) noexcept {
if (this != &other) {
mHandle = std::move(other.mHandle);
mSize = other.mSize;
@@ -293,7 +293,7 @@ struct hidl_vec {
*this = other;
}
- hidl_vec(hidl_vec<T> &&other)
+ hidl_vec(hidl_vec<T> &&other) noexcept
: mOwnsBuffer(false) {
*this = std::move(other);
}
@@ -354,7 +354,7 @@ struct hidl_vec {
return mBuffer;
}
- hidl_vec &operator=(hidl_vec &&other) {
+ hidl_vec &operator=(hidl_vec &&other) noexcept {
if (mOwnsBuffer) {
delete[] mBuffer;
}