diff options
| author | Wilson E. Alvarez | 2017-07-30 19:07:04 -0400 |
|---|---|---|
| committer | Wilson E. Alvarez | 2017-08-08 21:43:19 -0400 |
| commit | 6d112a68b685cde609d0d90b2c57f2db6a7b9df6 (patch) | |
| tree | 46a49619034e5e3f41fd3447c4c5727bfbfcdd64 /core/io | |
| parent | 950b205609ce41ab4804196a125e91274eb20258 (diff) | |
| download | godot-6d112a68b685cde609d0d90b2c57f2db6a7b9df6.tar.gz godot-6d112a68b685cde609d0d90b2c57f2db6a7b9df6.tar.zst godot-6d112a68b685cde609d0d90b2c57f2db6a7b9df6.zip | |
Moved member variables from constructor to initialization list
Diffstat (limited to 'core/io')
| -rw-r--r-- | core/io/file_access_pack.cpp | 7 | ||||
| -rw-r--r-- | core/io/resource_import.h | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index 79aa39521..c3bcfc840 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); diff --git a/core/io/resource_import.h b/core/io/resource_import.h index 9d2a5180d..d3f98cbc0 100644 --- a/core/io/resource_import.h +++ b/core/io/resource_import.h @@ -85,9 +85,9 @@ public: PropertyInfo option; Variant default_value; - ImportOption(const PropertyInfo &p_info, const Variant &p_default) { - option = p_info; - default_value = p_default; + ImportOption(const PropertyInfo &p_info, const Variant &p_default) + : option(p_info), + default_value(p_default) { } ImportOption() {} }; |
