Browse Source
Merge pull request #6375 from lioncash/iofs
common/fs/file: Default initialize IOFile members
pull/15/merge
Morph
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
4 deletions
-
src/common/fs/file.h
|
|
|
@ -117,7 +117,7 @@ template <typename Path> |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
class IOFile final : NonCopyable { |
|
|
|
class IOFile final { |
|
|
|
public: |
|
|
|
IOFile(); |
|
|
|
|
|
|
|
@ -142,7 +142,10 @@ public: |
|
|
|
FileType type = FileType::BinaryFile, |
|
|
|
FileShareFlag flag = FileShareFlag::ShareReadOnly); |
|
|
|
|
|
|
|
virtual ~IOFile(); |
|
|
|
~IOFile(); |
|
|
|
|
|
|
|
IOFile(const IOFile&) = delete; |
|
|
|
IOFile& operator=(const IOFile&) = delete; |
|
|
|
|
|
|
|
IOFile(IOFile&& other) noexcept; |
|
|
|
IOFile& operator=(IOFile&& other) noexcept; |
|
|
|
@ -441,8 +444,8 @@ public: |
|
|
|
|
|
|
|
private: |
|
|
|
std::filesystem::path file_path; |
|
|
|
FileAccessMode file_access_mode; |
|
|
|
FileType file_type; |
|
|
|
FileAccessMode file_access_mode{}; |
|
|
|
FileType file_type{}; |
|
|
|
|
|
|
|
std::FILE* file = nullptr; |
|
|
|
}; |
|
|
|
|