diff options
| -rw-r--r-- | src/common/file_util.cpp | 6 | ||||
| -rw-r--r-- | src/common/file_util.h | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index 7d96d04d9..53700c865 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp | |||
| @@ -876,11 +876,10 @@ void SplitFilename83(const std::string& filename, std::array<char, 9>& short_nam | |||
| 876 | } | 876 | } |
| 877 | 877 | ||
| 878 | IOFile::IOFile() | 878 | IOFile::IOFile() |
| 879 | : m_file(nullptr), m_good(true) | 879 | { |
| 880 | {} | 880 | } |
| 881 | 881 | ||
| 882 | IOFile::IOFile(const std::string& filename, const char openmode[]) | 882 | IOFile::IOFile(const std::string& filename, const char openmode[]) |
| 883 | : m_file(nullptr), m_good(true) | ||
| 884 | { | 883 | { |
| 885 | Open(filename, openmode); | 884 | Open(filename, openmode); |
| 886 | } | 885 | } |
| @@ -891,7 +890,6 @@ IOFile::~IOFile() | |||
| 891 | } | 890 | } |
| 892 | 891 | ||
| 893 | IOFile::IOFile(IOFile&& other) | 892 | IOFile::IOFile(IOFile&& other) |
| 894 | : m_file(nullptr), m_good(true) | ||
| 895 | { | 893 | { |
| 896 | Swap(other); | 894 | Swap(other); |
| 897 | } | 895 | } |
diff --git a/src/common/file_util.h b/src/common/file_util.h index d520130ce..b54a9fb72 100644 --- a/src/common/file_util.h +++ b/src/common/file_util.h | |||
| @@ -256,8 +256,8 @@ public: | |||
| 256 | void Clear() { m_good = true; std::clearerr(m_file); } | 256 | void Clear() { m_good = true; std::clearerr(m_file); } |
| 257 | 257 | ||
| 258 | private: | 258 | private: |
| 259 | std::FILE* m_file; | 259 | std::FILE* m_file = nullptr; |
| 260 | bool m_good; | 260 | bool m_good = true; |
| 261 | }; | 261 | }; |
| 262 | 262 | ||
| 263 | } // namespace | 263 | } // namespace |