Merge "Add noexcept to move constructors and assignment operators."
diff --git a/nn/common/CpuExecutor.cpp b/nn/common/CpuExecutor.cpp
index a1de3dd..a7ff01c 100644
--- a/nn/common/CpuExecutor.cpp
+++ b/nn/common/CpuExecutor.cpp
@@ -80,12 +80,12 @@
mBuffer = buffer;
}
-RunTimePoolInfo::RunTimePoolInfo(RunTimePoolInfo&& other) {
+RunTimePoolInfo::RunTimePoolInfo(RunTimePoolInfo&& other) noexcept {
moveFrom(std::move(other));
other.mBuffer = nullptr;
}
-RunTimePoolInfo& RunTimePoolInfo::operator=(RunTimePoolInfo&& other) {
+RunTimePoolInfo& RunTimePoolInfo::operator=(RunTimePoolInfo&& other) noexcept {
if (this != &other) {
release();
moveFrom(std::move(other));
diff --git a/nn/common/include/CpuExecutor.h b/nn/common/include/CpuExecutor.h
index 172006b..90a939f 100644
--- a/nn/common/include/CpuExecutor.h
+++ b/nn/common/include/CpuExecutor.h
@@ -75,8 +75,8 @@
explicit RunTimePoolInfo(uint8_t* buffer);
// Implement move
- RunTimePoolInfo(RunTimePoolInfo&& other);
- RunTimePoolInfo& operator=(RunTimePoolInfo&& other);
+ RunTimePoolInfo(RunTimePoolInfo&& other) noexcept;
+ RunTimePoolInfo& operator=(RunTimePoolInfo&& other) noexcept;
// Forbid copy
RunTimePoolInfo(const RunTimePoolInfo&) = delete;