diff options
| author | Martin Stjernholm <mast@google.com> | 2018-12-20 18:04:07 +0000 |
|---|---|---|
| committer | Martin Stjernholm <mast@google.com> | 2018-12-20 18:05:10 +0000 |
| commit | d4d7918f4443ade4e909308dab53183d19943849 (patch) | |
| tree | 05afc9173b7e1840cdcfef2f5c2309d0a3151147 /libdexfile | |
| parent | adf595900e6f6328c68a15b88f53529cb5e520f3 (diff) | |
| download | art-d4d7918f4443ade4e909308dab53183d19943849.tar.gz art-d4d7918f4443ade4e909308dab53183d19943849.tar.bz2 art-d4d7918f4443ade4e909308dab53183d19943849.zip | |
Move constructors and operators should be noexcept.
Bug: 121130430
Test: env WITH_TIDY=1 mmm art/libdexfile:libdexfile_support
Change-Id: Id73ec33bdb7d8a334b015935a2c87a1d178ad385
Diffstat (limited to 'libdexfile')
| -rw-r--r-- | libdexfile/external/include/art_api/ext_dex_file.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libdexfile/external/include/art_api/ext_dex_file.h b/libdexfile/external/include/art_api/ext_dex_file.h index 5f64ab1f9e..4a52a2b849 100644 --- a/libdexfile/external/include/art_api/ext_dex_file.h +++ b/libdexfile/external/include/art_api/ext_dex_file.h @@ -98,11 +98,11 @@ namespace dex { // Minimal std::string look-alike for a string returned from libdexfile. class DexString final { public: - DexString(DexString&& dex_str) { ReplaceExtString(std::move(dex_str)); } + DexString(DexString&& dex_str) noexcept { ReplaceExtString(std::move(dex_str)); } explicit DexString(const char* str = "") : ext_string_(ExtDexFileMakeString(str)) {} ~DexString() { ExtDexFileFreeString(ext_string_); } - DexString& operator=(DexString&& dex_str) { + DexString& operator=(DexString&& dex_str) noexcept { ReplaceExtString(std::move(dex_str)); return *this; } @@ -163,7 +163,7 @@ inline bool operator==(const MethodInfo& s1, const MethodInfo& s2) { // thread-safe. class DexFile { public: - DexFile(DexFile&& dex_file) { + DexFile(DexFile&& dex_file) noexcept { ext_dex_file_ = dex_file.ext_dex_file_; dex_file.ext_dex_file_ = nullptr; } |
