diff options
| author | 2018-04-29 18:29:03 -0400 | |
|---|---|---|
| committer | 2018-04-29 18:34:09 -0400 | |
| commit | e8bbafb746ce7e178be757471305539c05bb7f23 (patch) | |
| tree | 5396d4f28614f5b346a21776935597ec466f117f /src/common/file_util.h | |
| parent | file_util: Add static assertions to ReadBytes() and WriteBytes() (diff) | |
| download | yuzu-e8bbafb746ce7e178be757471305539c05bb7f23.tar.gz yuzu-e8bbafb746ce7e178be757471305539c05bb7f23.tar.xz yuzu-e8bbafb746ce7e178be757471305539c05bb7f23.zip | |
file_util: Make move constructor/assignment operator and related functions noexcept
Without this, it's possible to get compilation failures in the (rare) scenario where
a container is used to store a bunch of live IOFile instances, as they may be using
std::move_if_noexcept under the hood. Given these definitely don't throw exceptions
this is also not incorrect to add either.
Diffstat (limited to 'src/common/file_util.h')
| -rw-r--r-- | src/common/file_util.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/file_util.h b/src/common/file_util.h index 32ff4d8ca..fc6b3ea46 100644 --- a/src/common/file_util.h +++ b/src/common/file_util.h | |||
| @@ -160,10 +160,10 @@ public: | |||
| 160 | 160 | ||
| 161 | ~IOFile(); | 161 | ~IOFile(); |
| 162 | 162 | ||
| 163 | IOFile(IOFile&& other); | 163 | IOFile(IOFile&& other) noexcept; |
| 164 | IOFile& operator=(IOFile&& other); | 164 | IOFile& operator=(IOFile&& other) noexcept; |
| 165 | 165 | ||
| 166 | void Swap(IOFile& other); | 166 | void Swap(IOFile& other) noexcept; |
| 167 | 167 | ||
| 168 | bool Open(const std::string& filename, const char openmode[]); | 168 | bool Open(const std::string& filename, const char openmode[]); |
| 169 | bool Close(); | 169 | bool Close(); |