From e420eca2b244c303af51534ab09632045a186b21 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Thu, 3 Oct 2024 08:07:05 -0500 Subject: Cleanup from clang-tidy. --- source/fud_c_file.cpp | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'source/fud_c_file.cpp') 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; -- cgit v1.2.3