diff --git a/src/core/file_sys/disk_archive.cpp b/src/core/file_sys/disk_archive.cpp index 677f924676..faa28b84f1 100644 --- a/src/core/file_sys/disk_archive.cpp +++ b/src/core/file_sys/disk_archive.cpp @@ -52,7 +52,7 @@ bool DiskFile::Close() const { //////////////////////////////////////////////////////////////////////////////////////////////////// -DiskDirectory::DiskDirectory(const std::string& path) : directory() { +DiskDirectory::DiskDirectory(const std::string& path) { unsigned size = FileUtil::ScanDirectoryTree(path, directory); directory.size = size; directory.isDirectory = true; diff --git a/src/core/file_sys/disk_archive.h b/src/core/file_sys/disk_archive.h index 0de3747a17..fd6983ed1d 100644 --- a/src/core/file_sys/disk_archive.h +++ b/src/core/file_sys/disk_archive.h @@ -46,21 +46,20 @@ protected: class DiskDirectory : public DirectoryBackend { public: - DiskDirectory(const std::string& path); + explicit DiskDirectory(const std::string& path); ~DiskDirectory() override { Close(); } - u32 Read(const u32 count, Entry* entries) override; + u32 Read(u32 count, Entry* entries) override; bool Close() const override { return true; } protected: - u32 total_entries_in_directory; - FileUtil::FSTEntry directory; + FileUtil::FSTEntry directory{}; // We need to remember the last entry we returned, so a subsequent call to Read will continue // from the next one. This iterator will always point to the next unread entry.