From 6d112a68b685cde609d0d90b2c57f2db6a7b9df6 Mon Sep 17 00:00:00 2001 From: "Wilson E. Alvarez" Date: Sun, 30 Jul 2017 19:07:04 -0400 Subject: [PATCH] Moved member variables from constructor to initialization list --- core/class_db.cpp | 6 +- core/class_db.h | 17 +++-- core/core_string_names.cpp | 29 ++++--- core/core_string_names.h | 2 +- core/hash_map.h | 6 +- core/io/file_access_pack.cpp | 7 +- core/io/resource_import.h | 6 +- core/math/bsp_tree.cpp | 11 ++- core/math/math_2d.h | 30 ++++---- core/math/plane.h | 17 ++--- core/math/rect3.h | 6 +- core/math/transform.cpp | 7 +- core/object.cpp | 130 +++++++++++++++----------------- core/object.h | 26 +++---- core/pair.h | 6 +- core/project_settings.h | 28 +++---- core/script_debugger_remote.cpp | 38 +++++----- core/script_language.cpp | 9 +-- core/translation.cpp | 12 ++- core/variant_call.cpp | 6 +- scene/2d/navigation2d.h | 6 +- scene/3d/navigation.h | 6 +- 22 files changed, 196 insertions(+), 215 deletions(-) diff --git a/core/class_db.cpp b/core/class_db.cpp index 24d71f86b02..4db5793f276 100644 --- a/core/class_db.cpp +++ b/core/class_db.cpp @@ -46,9 +46,9 @@ #ifdef DEBUG_METHODS_ENABLED -ParamDef::ParamDef(const Variant &p_variant) { - used = true; - val = p_variant; +ParamDef::ParamDef(const Variant &p_variant) + : used(true), + val(p_variant) { } MethodDefinition D_METHOD(const char *p_name) { diff --git a/core/class_db.h b/core/class_db.h index 02eac0dbbca..05c4b6d9323 100644 --- a/core/class_db.h +++ b/core/class_db.h @@ -45,12 +45,11 @@ struct ParamHint { String hint_text; Variant default_val; - ParamHint(const String &p_name = "", PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_text = "", Variant p_default_val = Variant()) { - - name = p_name; - hint = p_hint; - hint_text = p_hint_text; - default_val = p_default_val; + ParamHint(const String &p_name = "", PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_text = "", Variant p_default_val = Variant()) + : name(p_name), + hint(p_hint), + hint_text(p_hint_text), + default_val(p_default_val) { } }; @@ -73,8 +72,10 @@ struct MethodDefinition { StringName name; Vector args; MethodDefinition() {} - MethodDefinition(const char *p_name) { name = p_name; } - MethodDefinition(const StringName &p_name) { name = p_name; } + MethodDefinition(const char *p_name) + : name(p_name) {} + MethodDefinition(const StringName &p_name) + : name(p_name) {} }; MethodDefinition D_METHOD(const char *p_name); diff --git a/core/core_string_names.cpp b/core/core_string_names.cpp index 2adc15447a1..2f5a684373a 100644 --- a/core/core_string_names.cpp +++ b/core/core_string_names.cpp @@ -31,21 +31,20 @@ CoreStringNames *CoreStringNames::singleton = NULL; -CoreStringNames::CoreStringNames() { - - _free = StaticCString::create("free"); - changed = StaticCString::create("changed"); - _meta = StaticCString::create("__meta__"); - _script = StaticCString::create("script"); - script_changed = StaticCString::create("script_changed"); - ___pdcdata = StaticCString::create("___pdcdata"); - __getvar = StaticCString::create("__getvar"); - _iter_init = StaticCString::create("_iter_init"); - _iter_next = StaticCString::create("_iter_next"); - _iter_get = StaticCString::create("_iter_get"); - get_rid = StaticCString::create("get_rid"); - _custom_features = StaticCString::create("_custom_features"); +CoreStringNames::CoreStringNames() + : _free(StaticCString::create("free")), + changed(StaticCString::create("changed")), + _meta(StaticCString::create("__meta__")), + _script(StaticCString::create("script")), + script_changed(StaticCString::create("script_changed")), + ___pdcdata(StaticCString::create("___pdcdata")), + __getvar(StaticCString::create("__getvar")), + _iter_init(StaticCString::create("_iter_init")), + _iter_next(StaticCString::create("_iter_next")), + _iter_get(StaticCString::create("_iter_get")), + get_rid(StaticCString::create("get_rid")), #ifdef TOOLS_ENABLED - _sections_unfolded = StaticCString::create("_sections_unfolded"); + _sections_unfolded(StaticCString::create("_sections_unfolded")), #endif + _custom_features(StaticCString::create("_custom_features")) { } diff --git a/core/core_string_names.h b/core/core_string_names.h index 501185f5b7b..40f76aa9c08 100644 --- a/core/core_string_names.h +++ b/core/core_string_names.h @@ -61,10 +61,10 @@ public: StringName _iter_next; StringName _iter_get; StringName get_rid; - StringName _custom_features; #ifdef TOOLS_ENABLED StringName _sections_unfolded; #endif + StringName _custom_features; }; #endif // SCENE_STRING_NAMES_H diff --git a/core/hash_map.h b/core/hash_map.h index 45e7b82d243..2d7249e2fcb 100644 --- a/core/hash_map.h +++ b/core/hash_map.h @@ -96,9 +96,9 @@ public: TData data; Pair() {} - Pair(const TKey &p_key, const TData &p_data) { - key = p_key; - data = p_data; + Pair(const TKey &p_key, const TData &p_data) + : key(p_key), + data(p_data) { } }; diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index 79aa39521fb..c3bcfc840b0 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 9d2a5180dce..d3f98cbc07f 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() {} }; diff --git a/core/math/bsp_tree.cpp b/core/math/bsp_tree.cpp index 327a6017c33..e22bc2b05e7 100644 --- a/core/math/bsp_tree.cpp +++ b/core/math/bsp_tree.cpp @@ -577,12 +577,11 @@ BSP_Tree::BSP_Tree(const PoolVector &p_faces, real_t p_error_radius) { error_radius = p_error_radius; } -BSP_Tree::BSP_Tree(const Vector &p_nodes, const Vector &p_planes, const Rect3 &p_aabb, real_t p_error_radius) { - - nodes = p_nodes; - planes = p_planes; - aabb = p_aabb; - error_radius = p_error_radius; +BSP_Tree::BSP_Tree(const Vector &p_nodes, const Vector &p_planes, const Rect3 &p_aabb, real_t p_error_radius) + : nodes(p_nodes), + planes(p_planes), + aabb(p_aabb), + error_radius(p_error_radius) { } BSP_Tree::~BSP_Tree() { diff --git a/core/math/math_2d.h b/core/math/math_2d.h index 780bb532d7b..b679371e032 100644 --- a/core/math/math_2d.h +++ b/core/math/math_2d.h @@ -378,13 +378,13 @@ struct Rect2 { operator String() const { return String(position) + ", " + String(size); } Rect2() {} - Rect2(real_t p_x, real_t p_y, real_t p_width, real_t p_height) { - position = Point2(p_x, p_y); - size = Size2(p_width, p_height); + Rect2(real_t p_x, real_t p_y, real_t p_width, real_t p_height) + : position(Point2(p_x, p_y)), + size(Size2(p_width, p_height)) { } - Rect2(const Point2 &p_pos, const Size2 &p_size) { - position = p_pos; - size = p_size; + Rect2(const Point2 &p_pos, const Size2 &p_size) + : position(p_pos), + size(p_size) { } }; @@ -571,18 +571,18 @@ struct Rect2i { operator String() const { return String(position) + ", " + String(size); } operator Rect2() const { return Rect2(position, size); } - Rect2i(const Rect2 &p_r2) { - position = p_r2.position; - size = p_r2.size; + Rect2i(const Rect2 &p_r2) + : position(p_r2.position), + size(p_r2.size) { } Rect2i() {} - Rect2i(int p_x, int p_y, int p_width, int p_height) { - position = Point2(p_x, p_y); - size = Size2(p_width, p_height); + Rect2i(int p_x, int p_y, int p_width, int p_height) + : position(Point2(p_x, p_y)), + size(Size2(p_width, p_height)) { } - Rect2i(const Point2 &p_pos, const Size2 &p_size) { - position = p_pos; - size = p_size; + Rect2i(const Point2 &p_pos, const Size2 &p_size) + : position(p_pos), + size(p_size) { } }; diff --git a/core/math/plane.h b/core/math/plane.h index 5a048674e47..92ebcd80249 100644 --- a/core/math/plane.h +++ b/core/math/plane.h @@ -75,7 +75,8 @@ public: _FORCE_INLINE_ Plane() { d = 0; } _FORCE_INLINE_ Plane(real_t p_a, real_t p_b, real_t p_c, real_t p_d) - : normal(p_a, p_b, p_c), d(p_d){}; + : normal(p_a, p_b, p_c), + d(p_d){}; _FORCE_INLINE_ Plane(const Vector3 &p_normal, real_t p_d); _FORCE_INLINE_ Plane(const Vector3 &p_point, const Vector3 &p_normal); @@ -99,16 +100,14 @@ bool Plane::has_point(const Vector3 &p_point, real_t _epsilon) const { return (dist <= _epsilon); } -Plane::Plane(const Vector3 &p_normal, real_t p_d) { - - normal = p_normal; - d = p_d; +Plane::Plane(const Vector3 &p_normal, real_t p_d) + : normal(p_normal), + d(p_d) { } -Plane::Plane(const Vector3 &p_point, const Vector3 &p_normal) { - - normal = p_normal; - d = p_normal.dot(p_point); +Plane::Plane(const Vector3 &p_point, const Vector3 &p_normal) + : normal(p_normal), + d(p_normal.dot(p_point)) { } Plane::Plane(const Vector3 &p_point1, const Vector3 &p_point2, const Vector3 &p_point3, ClockDirection p_dir) { diff --git a/core/math/rect3.h b/core/math/rect3.h index b7c94ad9f7c..e5d74620095 100644 --- a/core/math/rect3.h +++ b/core/math/rect3.h @@ -101,9 +101,9 @@ public: operator String() const; _FORCE_INLINE_ Rect3() {} - inline Rect3(const Vector3 &p_pos, const Vector3 &p_size) { - position = p_pos; - size = p_size; + inline Rect3(const Vector3 &p_pos, const Vector3 &p_size) + : position(p_pos), + size(p_size) { } }; diff --git a/core/math/transform.cpp b/core/math/transform.cpp index 7a502145965..3a86fbfc6c1 100644 --- a/core/math/transform.cpp +++ b/core/math/transform.cpp @@ -208,8 +208,7 @@ Transform::operator String() const { return basis.operator String() + " - " + origin.operator String(); } -Transform::Transform(const Basis &p_basis, const Vector3 &p_origin) { - - basis = p_basis; - origin = p_origin; +Transform::Transform(const Basis &p_basis, const Vector3 &p_origin) + : basis(p_basis), + origin(p_origin) { } diff --git a/core/object.cpp b/core/object.cpp index de75257ede0..df3b39072bf 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -122,10 +122,9 @@ MethodInfo::operator Dictionary() const { return d; } -MethodInfo::MethodInfo() { - - id = 0; - flags = METHOD_FLAG_NORMAL; +MethodInfo::MethodInfo() + : flags(METHOD_FLAG_NORMAL), + id(0) { } MethodInfo MethodInfo::from_dict(const Dictionary &p_dict) { @@ -161,125 +160,114 @@ MethodInfo MethodInfo::from_dict(const Dictionary &p_dict) { return mi; } -MethodInfo::MethodInfo(const String &p_name) { - - id = 0; - name = p_name; - flags = METHOD_FLAG_NORMAL; +MethodInfo::MethodInfo(const String &p_name) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { } -MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1) { - - id = 0; - name = p_name; +MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { arguments.push_back(p_param1); - flags = METHOD_FLAG_NORMAL; } -MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2) { - - id = 0; - name = p_name; +MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { arguments.push_back(p_param1); arguments.push_back(p_param2); - flags = METHOD_FLAG_NORMAL; } -MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3) { - - id = 0; - name = p_name; +MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { arguments.push_back(p_param1); arguments.push_back(p_param2); arguments.push_back(p_param3); - flags = METHOD_FLAG_NORMAL; } -MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4) { - - id = 0; - name = p_name; +MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { arguments.push_back(p_param1); arguments.push_back(p_param2); arguments.push_back(p_param3); arguments.push_back(p_param4); - flags = METHOD_FLAG_NORMAL; } -MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5) { - id = 0; - name = p_name; +MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { arguments.push_back(p_param1); arguments.push_back(p_param2); arguments.push_back(p_param3); arguments.push_back(p_param4); arguments.push_back(p_param5); - flags = METHOD_FLAG_NORMAL; } -MethodInfo::MethodInfo(Variant::Type ret) { - - id = 0; - flags = METHOD_FLAG_NORMAL; +MethodInfo::MethodInfo(Variant::Type ret) + : flags(METHOD_FLAG_NORMAL), + id(0) { return_val.type = ret; } -MethodInfo::MethodInfo(Variant::Type ret, const String &p_name) { - - id = 0; - name = p_name; - flags = METHOD_FLAG_NORMAL; +MethodInfo::MethodInfo(Variant::Type ret, const String &p_name) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { return_val.type = ret; } -MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1) { - - id = 0; - name = p_name; +MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { + return_val.type = ret; arguments.push_back(p_param1); - flags = METHOD_FLAG_NORMAL; - return_val.type = ret; } -MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2) { - - id = 0; - name = p_name; +MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { + return_val.type = ret; arguments.push_back(p_param1); arguments.push_back(p_param2); - flags = METHOD_FLAG_NORMAL; - return_val.type = ret; } -MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3) { - - id = 0; - name = p_name; +MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { + return_val.type = ret; arguments.push_back(p_param1); arguments.push_back(p_param2); arguments.push_back(p_param3); - flags = METHOD_FLAG_NORMAL; - return_val.type = ret; } -MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4) { - - id = 0; - name = p_name; +MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { + return_val.type = ret; arguments.push_back(p_param1); arguments.push_back(p_param2); arguments.push_back(p_param3); arguments.push_back(p_param4); - flags = METHOD_FLAG_NORMAL; - return_val.type = ret; } -MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5) { - id = 0; - name = p_name; +MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { + return_val.type = ret; arguments.push_back(p_param1); arguments.push_back(p_param2); arguments.push_back(p_param3); arguments.push_back(p_param4); arguments.push_back(p_param5); - flags = METHOD_FLAG_NORMAL; - return_val.type = ret; } Object::Connection::operator Variant() const { diff --git a/core/object.h b/core/object.h index f0147080b4d..551c3c31b97 100644 --- a/core/object.h +++ b/core/object.h @@ -139,17 +139,17 @@ struct PropertyInfo { static PropertyInfo from_dict(const Dictionary &p_dict); - PropertyInfo() { - type = Variant::NIL; - hint = PROPERTY_HINT_NONE; - usage = PROPERTY_USAGE_DEFAULT; + PropertyInfo() + : type(Variant::NIL), + hint(PROPERTY_HINT_NONE), + usage(PROPERTY_USAGE_DEFAULT) { } - PropertyInfo(Variant::Type p_type, const String p_name, PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_string = "", uint32_t p_usage = PROPERTY_USAGE_DEFAULT) { - type = p_type; - name = p_name; - hint = p_hint; - hint_string = p_hint_string; - usage = p_usage; + PropertyInfo(Variant::Type p_type, const String p_name, PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_string = "", uint32_t p_usage = PROPERTY_USAGE_DEFAULT) + : type(p_type), + name(p_name), + hint(p_hint), + hint_string(p_hint_string), + usage(p_usage) { } bool operator<(const PropertyInfo &p_info) const { return name < p_info.name; @@ -401,9 +401,9 @@ private: _FORCE_INLINE_ bool operator<(const Target &p_target) const { return (_id == p_target._id) ? (method < p_target.method) : (_id < p_target._id); } - Target(const ObjectID &p_id, const StringName &p_method) { - _id = p_id; - method = p_method; + Target(const ObjectID &p_id, const StringName &p_method) + : _id(p_id), + method(p_method) { } Target() { _id = 0; } }; diff --git a/core/pair.h b/core/pair.h index 761caf77912..d4b18975374 100644 --- a/core/pair.h +++ b/core/pair.h @@ -37,9 +37,9 @@ struct Pair { S second; Pair() {} - Pair(F p_first, S p_second) { - first = p_first; - second = p_second; + Pair(F p_first, S p_second) + : first(p_first), + second(p_second) { } }; diff --git a/core/project_settings.h b/core/project_settings.h index c58ac3ca498..c64bb393d1e 100644 --- a/core/project_settings.h +++ b/core/project_settings.h @@ -48,9 +48,9 @@ public: struct Singleton { StringName name; Object *ptr; - Singleton(const StringName &p_name = StringName(), Object *p_ptr = NULL) { - name = p_name; - ptr = p_ptr; + Singleton(const StringName &p_name = StringName(), Object *p_ptr = NULL) + : name(p_name), + ptr(p_ptr) { } }; enum { @@ -66,18 +66,18 @@ protected: Variant initial; bool hide_from_editor; bool overrided; - VariantContainer() { - order = 0; - hide_from_editor = false; - persist = false; - overrided = false; + VariantContainer() + : order(0), + persist(false), + hide_from_editor(false), + overrided(false) { } - VariantContainer(const Variant &p_variant, int p_order, bool p_persist = false) { - variant = p_variant; - order = p_order; - hide_from_editor = false; - persist = p_persist; - overrided = false; + VariantContainer(const Variant &p_variant, int p_order, bool p_persist = false) + : order(p_order), + persist(p_persist), + variant(p_variant), + hide_from_editor(false), + overrided(false) { } }; diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp index 6f12338f66c..3628f2ecafe 100644 --- a/core/script_debugger_remote.cpp +++ b/core/script_debugger_remote.cpp @@ -940,29 +940,32 @@ void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL; -ScriptDebuggerRemote::ScriptDebuggerRemote() { +ScriptDebuggerRemote::ScriptDebuggerRemote() + : profiling(false), + max_frame_functions(16), + skip_profile_frame(false), + reload_all_scripts(false), + tcp_client(StreamPeerTCP::create_ref()), + packet_peer_stream(Ref(memnew(PacketPeerStream))), + last_perf_time(0), + performance(ProjectSettings::get_singleton()->get_singleton_object("Performance")), + requested_quit(false), + mutex(Mutex::create()), + max_cps(GLOBAL_GET("network/limits/debugger_stdout/max_chars_per_second")), + char_count(0), + last_msec(0), + msec_count(0), + locking(false), + poll_every(0), + request_scene_tree(NULL), + live_edit_funcs(NULL) { - tcp_client = StreamPeerTCP::create_ref(); - packet_peer_stream = Ref(memnew(PacketPeerStream)); packet_peer_stream->set_stream_peer(tcp_client); packet_peer_stream->set_output_buffer_max_size(1024 * 1024 * 8); //8mb should be way more than enough - mutex = Mutex::create(); - locking = false; phl.printfunc = _print_handler; phl.userdata = this; add_print_handler(&phl); - requested_quit = false; - performance = ProjectSettings::get_singleton()->get_singleton_object("Performance"); - last_perf_time = 0; - poll_every = 0; - request_scene_tree = NULL; - live_edit_funcs = NULL; - max_cps = GLOBAL_GET("network/limits/debugger_stdout/max_chars_per_second"); - char_count = 0; - msec_count = 0; - last_msec = 0; - skip_profile_frame = false; eh.errfunc = _err_handler; eh.userdata = this; @@ -970,9 +973,6 @@ ScriptDebuggerRemote::ScriptDebuggerRemote() { profile_info.resize(CLAMP(int(ProjectSettings::get_singleton()->get("debug/settings/profiler/max_functions")), 128, 65535)); profile_info_ptrs.resize(profile_info.size()); - profiling = false; - max_frame_functions = 16; - reload_all_scripts = false; } ScriptDebuggerRemote::~ScriptDebuggerRemote() { diff --git a/core/script_language.cpp b/core/script_language.cpp index bb99e0abaef..46640491453 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -384,11 +384,10 @@ void PlaceHolderScriptInstance::update(const List &p_properties, c //change notify } -PlaceHolderScriptInstance::PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref