summaryrefslogtreecommitdiff
path: root/source/fud_c_file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/fud_c_file.cpp')
-rw-r--r--source/fud_c_file.cpp26
1 files changed, 10 insertions, 16 deletions
diff --git a/source/fud_c_file.cpp b/source/fud_c_file.cpp
index e2e71bf..3961042 100644
--- a/source/fud_c_file.cpp
+++ b/source/fud_c_file.cpp
@@ -34,12 +34,9 @@ CBinaryFile::CBinaryFile(const String& filename, CFileMode mode, const String& e
{
}
-CBinaryFile::CBinaryFile(CBinaryFile&& rhs) :
- m_filename{std::move(rhs.m_filename)},
- m_extraFlags{std::move(rhs.m_extraFlags)},
- m_mode{std::move(rhs.m_mode)},
- m_modeFlags{std::move(rhs.m_modeFlags)},
- m_file{rhs.m_file}
+CBinaryFile::CBinaryFile(CBinaryFile&& rhs) noexcept :
+ m_filename{std::move(rhs.m_filename)}, m_extraFlags{std::move(rhs.m_extraFlags)}, m_mode{std::move(rhs.m_mode)},
+ m_modeFlags{rhs.m_modeFlags}, m_file{rhs.m_file}
{
}
@@ -47,14 +44,14 @@ CBinaryFile::~CBinaryFile() {
close();
}
-CBinaryFile& CBinaryFile::operator=(CBinaryFile&& rhs)
+CBinaryFile& CBinaryFile::operator=(CBinaryFile&& rhs) noexcept
{
close();
m_filename = std::move(rhs.m_filename);
m_extraFlags = std::move(rhs.m_extraFlags);
m_mode = std::move(rhs.m_mode);
- m_modeFlags = std::move(rhs.m_modeFlags);
+ m_modeFlags = rhs.m_modeFlags;
m_file = rhs.m_file;
return *this;
@@ -75,12 +72,9 @@ CTextFile::CTextFile(const String& filename, CFileMode mode, const String& extra
{
}
-CTextFile::CTextFile(CTextFile&& rhs) :
- m_filename{std::move(rhs.m_filename)},
- m_extraFlags{std::move(rhs.m_extraFlags)},
- m_mode{std::move(rhs.m_mode)},
- m_modeFlags{std::move(rhs.m_modeFlags)},
- m_file{rhs.m_file}
+CTextFile::CTextFile(CTextFile&& rhs) noexcept :
+ m_filename{std::move(rhs.m_filename)}, m_extraFlags{std::move(rhs.m_extraFlags)}, m_mode{std::move(rhs.m_mode)},
+ m_modeFlags{rhs.m_modeFlags}, m_file{rhs.m_file}
{
}
@@ -88,14 +82,14 @@ CTextFile::~CTextFile() {
close();
}
-CTextFile& CTextFile::operator=(CTextFile&& rhs)
+CTextFile& CTextFile::operator=(CTextFile&& rhs) noexcept
{
close();
m_filename = std::move(rhs.m_filename);
m_extraFlags = std::move(rhs.m_extraFlags);
m_mode = std::move(rhs.m_mode);
- m_modeFlags = std::move(rhs.m_modeFlags);
+ m_modeFlags = rhs.m_modeFlags;
m_file = rhs.m_file;
return *this;