summaryrefslogtreecommitdiff
path: root/core/io/file_access_pack.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/io/file_access_pack.h')
-rw-r--r--core/io/file_access_pack.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h
index 8df6826ac9..aa3a14272b 100644
--- a/core/io/file_access_pack.h
+++ b/core/io/file_access_pack.h
@@ -61,15 +61,15 @@ public:
private:
struct PackedDir {
- PackedDir *parent;
+ PackedDir *parent = nullptr;
String name;
Map<String, PackedDir *> subdirs;
Set<String> files;
};
struct PathMD5 {
- uint64_t a;
- uint64_t b;
+ uint64_t a = 0;
+ uint64_t b = 0;
bool operator<(const PathMD5 &p_md5) const {
if (p_md5.a == a) {
@@ -83,14 +83,12 @@ private:
return a == p_md5.a && b == p_md5.b;
};
- PathMD5() {
- a = b = 0;
- };
+ PathMD5() {}
PathMD5(const Vector<uint8_t> p_buf) {
a = *((uint64_t *)&p_buf[0]);
b = *((uint64_t *)&p_buf[8]);
- };
+ }
};
Map<PathMD5, PackedFile> files;
@@ -98,10 +96,9 @@ private:
Vector<PackSource *> sources;
PackedDir *root;
- //Map<String,PackedDir*> dirs;
static PackedData *singleton;
- bool disabled;
+ bool disabled = false;
void _free_packed_dirs(PackedDir *p_dir);
@@ -203,7 +200,7 @@ class DirAccessPack : public DirAccess {
List<String> list_dirs;
List<String> list_files;
- bool cdir;
+ bool cdir = false;
public:
virtual Error list_dir_begin();
@@ -231,7 +228,7 @@ public:
virtual String get_filesystem_type() const;
DirAccessPack();
- ~DirAccessPack();
+ ~DirAccessPack() {}
};
#endif // FILE_ACCESS_PACK_H