mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 19:00:14 -05:00
Merge pull request #6375 from lioncash/iofs
common/fs/file: Default initialize IOFile members
This commit is contained in:
commit
d25648cb6c
1 changed files with 7 additions and 4 deletions
|
@ -117,7 +117,7 @@ template <typename Path>
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class IOFile final : NonCopyable {
|
class IOFile final {
|
||||||
public:
|
public:
|
||||||
IOFile();
|
IOFile();
|
||||||
|
|
||||||
|
@ -142,7 +142,10 @@ public:
|
||||||
FileType type = FileType::BinaryFile,
|
FileType type = FileType::BinaryFile,
|
||||||
FileShareFlag flag = FileShareFlag::ShareReadOnly);
|
FileShareFlag flag = FileShareFlag::ShareReadOnly);
|
||||||
|
|
||||||
virtual ~IOFile();
|
~IOFile();
|
||||||
|
|
||||||
|
IOFile(const IOFile&) = delete;
|
||||||
|
IOFile& operator=(const IOFile&) = delete;
|
||||||
|
|
||||||
IOFile(IOFile&& other) noexcept;
|
IOFile(IOFile&& other) noexcept;
|
||||||
IOFile& operator=(IOFile&& other) noexcept;
|
IOFile& operator=(IOFile&& other) noexcept;
|
||||||
|
@ -441,8 +444,8 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::filesystem::path file_path;
|
std::filesystem::path file_path;
|
||||||
FileAccessMode file_access_mode;
|
FileAccessMode file_access_mode{};
|
||||||
FileType file_type;
|
FileType file_type{};
|
||||||
|
|
||||||
std::FILE* file = nullptr;
|
std::FILE* file = nullptr;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue