diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 1fae3418f5..4094f5edcf 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -908,18 +908,18 @@ IOFile::~IOFile() Close(); } -IOFile::IOFile(IOFile&& other) : m_file(nullptr), m_good(true) +IOFile::IOFile(IOFile&& other) noexcept : m_file(nullptr), m_good(true) { Swap(other); } -IOFile& IOFile::operator=(IOFile&& other) +IOFile& IOFile::operator=(IOFile&& other) noexcept { Swap(other); return *this; } -void IOFile::Swap(IOFile& other) +void IOFile::Swap(IOFile& other) noexcept { std::swap(m_file, other.m_file); std::swap(m_good, other.m_good); diff --git a/Source/Core/Common/FileUtil.h b/Source/Core/Common/FileUtil.h index 445c7fc0f4..ef012ad4ff 100644 --- a/Source/Core/Common/FileUtil.h +++ b/Source/Core/Common/FileUtil.h @@ -168,10 +168,10 @@ public: ~IOFile(); - IOFile(IOFile&& other); - IOFile& operator=(IOFile&& other); + IOFile(IOFile&& other) noexcept; + IOFile& operator=(IOFile&& other) noexcept; - void Swap(IOFile& other); + void Swap(IOFile& other) noexcept; bool Open(const std::string& filename, const char openmode[]); bool Close();