summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/class_db.cpp6
-rw-r--r--core/class_db.h17
-rw-r--r--core/core_string_names.cpp29
-rw-r--r--core/core_string_names.h2
-rw-r--r--core/hash_map.h6
-rw-r--r--core/io/file_access_pack.cpp7
-rw-r--r--core/io/resource_import.h6
-rw-r--r--core/math/bsp_tree.cpp11
-rw-r--r--core/math/math_2d.h30
-rw-r--r--core/math/plane.h17
-rw-r--r--core/math/rect3.h6
-rw-r--r--core/math/transform.cpp7
-rw-r--r--core/object.cpp130
-rw-r--r--core/object.h26
-rw-r--r--core/pair.h6
-rw-r--r--core/project_settings.h28
-rw-r--r--core/script_debugger_remote.cpp38
-rw-r--r--core/script_language.cpp9
-rw-r--r--core/translation.cpp12
-rw-r--r--core/variant_call.cpp6
20 files changed, 190 insertions, 209 deletions
diff --git a/core/class_db.cpp b/core/class_db.cpp
index 24d71f86b0..4db5793f27 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 02eac0dbbc..05c4b6d932 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<StringName> 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 2adc15447a..2f5a684373 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 501185f5b7..40f76aa9c0 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 45e7b82d24..2d7249e2fc 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 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);
diff --git a/core/io/resource_import.h b/core/io/resource_import.h
index 9d2a5180dc..d3f98cbc07 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 327a6017c3..e22bc2b05e 100644
--- a/core/math/bsp_tree.cpp
+++ b/core/math/bsp_tree.cpp
@@ -577,12 +577,11 @@ BSP_Tree::BSP_Tree(const PoolVector<Face3> &p_faces, real_t p_error_radius) {
error_radius = p_error_radius;
}
-BSP_Tree::BSP_Tree(const Vector<Node> &p_nodes, const Vector<Plane> &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<Node> &p_nodes, const Vector<Plane> &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 780bb532d7..b679371e03 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 5a048674e4..92ebcd8024 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 b7c94ad9f7..e5d7462009 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 7a50214596..3a86fbfc6c 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 de75257ede..df3b39072b 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;
- arguments.push_back(p_param1);
- flags = METHOD_FLAG_NORMAL;
+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);
}
-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 f0147080b4..551c3c31b9 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 761caf7791..d4b1897537 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 c58ac3ca49..c64bb393d1 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 6f12338f66..3628f2ecaf 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<PacketPeerStream>(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<PacketPeerStream>(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 bb99e0abae..4664049145 100644
--- a/core/script_language.cpp
+++ b/core/script_language.cpp
@@ -384,11 +384,10 @@ void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, c
//change notify
}
-PlaceHolderScriptInstance::PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref<Script> p_script, Object *p_owner) {
-
- language = p_language;
- script = p_script;
- owner = p_owner;
+PlaceHolderScriptInstance::PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref<Script> p_script, Object *p_owner)
+ : owner(p_owner),
+ language(p_language),
+ script(p_script) {
}
PlaceHolderScriptInstance::~PlaceHolderScriptInstance() {
diff --git a/core/translation.cpp b/core/translation.cpp
index 50694e4a2d..a524b10b3b 100644
--- a/core/translation.cpp
+++ b/core/translation.cpp
@@ -923,9 +923,8 @@ void Translation::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "locale"), "set_locale", "get_locale");
}
-Translation::Translation() {
-
- locale = "en";
+Translation::Translation()
+ : locale("en") {
}
///////////////////////////////////////////////
@@ -1144,9 +1143,8 @@ void TranslationServer::load_translations() {
}
}
-TranslationServer::TranslationServer() {
-
+TranslationServer::TranslationServer()
+ : locale("en"),
+ enabled(true) {
singleton = this;
- locale = "en";
- enabled = true;
}
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index 4a806aec6c..aabc2546bc 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -130,9 +130,9 @@ struct _VariantCall {
StringName name;
Variant::Type type;
Arg() { type = Variant::NIL; }
- Arg(Variant::Type p_type, const StringName &p_name) {
- name = p_name;
- type = p_type;
+ Arg(Variant::Type p_type, const StringName &p_name)
+ : name(p_name),
+ type(p_type) {
}
};