Skip to content
Snippets Groups Projects
Commit 5f51622e authored by Lioncash's avatar Lioncash
Browse files

file_util: In-class initialize data members

parent 655623eb
No related branches found
No related tags found
No related merge requests found
...@@ -876,11 +876,10 @@ void SplitFilename83(const std::string& filename, std::array<char, 9>& short_nam ...@@ -876,11 +876,10 @@ void SplitFilename83(const std::string& filename, std::array<char, 9>& short_nam
} }
IOFile::IOFile() IOFile::IOFile()
: m_file(nullptr), m_good(true) {
{} }
IOFile::IOFile(const std::string& filename, const char openmode[]) IOFile::IOFile(const std::string& filename, const char openmode[])
: m_file(nullptr), m_good(true)
{ {
Open(filename, openmode); Open(filename, openmode);
} }
...@@ -891,7 +890,6 @@ IOFile::~IOFile() ...@@ -891,7 +890,6 @@ IOFile::~IOFile()
} }
IOFile::IOFile(IOFile&& other) IOFile::IOFile(IOFile&& other)
: m_file(nullptr), m_good(true)
{ {
Swap(other); Swap(other);
} }
......
...@@ -256,8 +256,8 @@ public: ...@@ -256,8 +256,8 @@ public:
void Clear() { m_good = true; std::clearerr(m_file); } void Clear() { m_good = true; std::clearerr(m_file); }
private: private:
std::FILE* m_file; std::FILE* m_file = nullptr;
bool m_good; bool m_good = true;
}; };
} // namespace } // namespace
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment