diff options
author | Chih-Hung Hsieh <chh@google.com> | 2018-09-25 14:30:16 -0700 |
---|---|---|
committer | Chih-hung Hsieh <chh@google.com> | 2018-10-05 16:41:35 +0000 |
commit | d820b27475a10013f45bb7488ce183b160fe6658 (patch) | |
tree | 6272bebbae5471481ab4a1406480f9d52831f3fa | |
parent | 0c23dfee3bd3a5fd2cb15b9263623ee83b7d80c0 (diff) | |
download | extras-d820b27475a10013f45bb7488ce183b160fe6658.tar.gz |
Add noexcept to move constructors and assignment operators.
Bug: 116614593
Test: build with WITH_TIDY=1
Change-Id: I92ae7348e51e0610cef54b80087189bb1fe5b12c
-rw-r--r-- | simpleperf/record.cpp | 2 | ||||
-rw-r--r-- | simpleperf/record.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/simpleperf/record.cpp b/simpleperf/record.cpp index 1e9c945b..2d684a8a 100644 --- a/simpleperf/record.cpp +++ b/simpleperf/record.cpp @@ -175,7 +175,7 @@ size_t SampleId::Size() const { return size; } -Record::Record(Record&& other) { +Record::Record(Record&& other) noexcept { header = other.header; sample_id = other.sample_id; binary_ = other.binary_; diff --git a/simpleperf/record.h b/simpleperf/record.h index 3ba73ec0..adde3f44 100644 --- a/simpleperf/record.h +++ b/simpleperf/record.h @@ -216,7 +216,7 @@ struct Record { Record() : binary_(nullptr), own_binary_(false) {} explicit Record(char* p) : header(p), binary_(p), own_binary_(false) {} - Record(Record&& other); + Record(Record&& other) noexcept; virtual ~Record() { if (own_binary_) { |