summaryrefslogtreecommitdiffstats
path: root/core/io/file_access_pack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/io/file_access_pack.cpp')
-rw-r--r--core/io/file_access_pack.cpp7
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);