diff options
author | Chih-Hung Hsieh <chh@google.com> | 2018-09-25 11:16:22 -0700 |
---|---|---|
committer | Chih-hung Hsieh <chh@google.com> | 2018-10-05 16:43:47 +0000 |
commit | 747eb149d06d9077e7b44aa1edd966e637386f33 (patch) | |
tree | f64bdec4eba3c79bcb6dd1da72e948da5e3a08f6 /libutils/FileMap.cpp | |
parent | 5f2a21d244be6cbbc64047474b0aca352f93b2d9 (diff) | |
download | system_core-747eb149d06d9077e7b44aa1edd966e637386f33.tar.gz system_core-747eb149d06d9077e7b44aa1edd966e637386f33.tar.bz2 system_core-747eb149d06d9077e7b44aa1edd966e637386f33.zip |
Add noexcept to move constructors and assignment operators.
Bug: 116614593
Test: build with WITH_TIDY=1
Change-Id: I5a7461386946ca623ab509609092aa0ac8418b80
Diffstat (limited to 'libutils/FileMap.cpp')
-rw-r--r-- | libutils/FileMap.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libutils/FileMap.cpp b/libutils/FileMap.cpp index 583c6b9e4..5feb2aa76 100644 --- a/libutils/FileMap.cpp +++ b/libutils/FileMap.cpp @@ -62,11 +62,17 @@ FileMap::FileMap(void) } // Move Constructor. -FileMap::FileMap(FileMap&& other) - : mFileName(other.mFileName), mBasePtr(other.mBasePtr), mBaseLength(other.mBaseLength), - mDataOffset(other.mDataOffset), mDataPtr(other.mDataPtr), mDataLength(other.mDataLength) +FileMap::FileMap(FileMap&& other) noexcept + : mFileName(other.mFileName), + mBasePtr(other.mBasePtr), + mBaseLength(other.mBaseLength), + mDataOffset(other.mDataOffset), + mDataPtr(other.mDataPtr), + mDataLength(other.mDataLength) #if defined(__MINGW32__) - , mFileHandle(other.mFileHandle), mFileMapping(other.mFileMapping) + , + mFileHandle(other.mFileHandle), + mFileMapping(other.mFileMapping) #endif { other.mFileName = nullptr; @@ -79,7 +85,7 @@ FileMap::FileMap(FileMap&& other) } // Move assign operator. -FileMap& FileMap::operator=(FileMap&& other) { +FileMap& FileMap::operator=(FileMap&& other) noexcept { mFileName = other.mFileName; mBasePtr = other.mBasePtr; mBaseLength = other.mBaseLength; |