diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-08-11 10:31:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-11 10:31:04 +0200 |
commit | 306c0471f7e1450340823dbd4a72b183d486c512 (patch) | |
tree | abe207af243ba9b2090f5e059bbc08f81876d7e3 /core/io/file_access_pack.cpp | |
parent | 8e6768c963b0ed825e4a4dbf3aeee5907168d697 (diff) | |
parent | 6d112a68b685cde609d0d90b2c57f2db6a7b9df6 (diff) | |
download | redot-engine-306c0471f7e1450340823dbd4a72b183d486c512.tar.gz |
Merge pull request #9987 from Rubonnek/move-members-to-initilization-list
Moved member variables from constructor to initialization list
Diffstat (limited to 'core/io/file_access_pack.cpp')
-rw-r--r-- | core/io/file_access_pack.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index 79aa39521f..c3bcfc840b 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -308,10 +308,9 @@ bool FileAccessPack::file_exists(const String &p_name) { return false; } -FileAccessPack::FileAccessPack(const String &p_path, const PackedData::PackedFile &p_file) { - - pf = p_file; - f = FileAccess::open(pf.pack, FileAccess::READ); +FileAccessPack::FileAccessPack(const String &p_path, const PackedData::PackedFile &p_file) + : pf(p_file), + f(FileAccess::open(pf.pack, FileAccess::READ)) { if (!f) { ERR_EXPLAIN("Can't open pack-referenced file: " + String(pf.pack)); ERR_FAIL_COND(!f); |