Moved member variables from constructor to initialization list
This commit is contained in:
parent
950b205609
commit
6d112a68b6
|
@ -46,9 +46,9 @@
|
||||||
|
|
||||||
#ifdef DEBUG_METHODS_ENABLED
|
#ifdef DEBUG_METHODS_ENABLED
|
||||||
|
|
||||||
ParamDef::ParamDef(const Variant &p_variant) {
|
ParamDef::ParamDef(const Variant &p_variant)
|
||||||
used = true;
|
: used(true),
|
||||||
val = p_variant;
|
val(p_variant) {
|
||||||
}
|
}
|
||||||
|
|
||||||
MethodDefinition D_METHOD(const char *p_name) {
|
MethodDefinition D_METHOD(const char *p_name) {
|
||||||
|
|
|
@ -45,12 +45,11 @@ struct ParamHint {
|
||||||
String hint_text;
|
String hint_text;
|
||||||
Variant default_val;
|
Variant default_val;
|
||||||
|
|
||||||
ParamHint(const String &p_name = "", PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_text = "", Variant p_default_val = Variant()) {
|
ParamHint(const String &p_name = "", PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_text = "", Variant p_default_val = Variant())
|
||||||
|
: name(p_name),
|
||||||
name = p_name;
|
hint(p_hint),
|
||||||
hint = p_hint;
|
hint_text(p_hint_text),
|
||||||
hint_text = p_hint_text;
|
default_val(p_default_val) {
|
||||||
default_val = p_default_val;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -73,8 +72,10 @@ struct MethodDefinition {
|
||||||
StringName name;
|
StringName name;
|
||||||
Vector<StringName> args;
|
Vector<StringName> args;
|
||||||
MethodDefinition() {}
|
MethodDefinition() {}
|
||||||
MethodDefinition(const char *p_name) { name = p_name; }
|
MethodDefinition(const char *p_name)
|
||||||
MethodDefinition(const StringName &p_name) { name = p_name; }
|
: name(p_name) {}
|
||||||
|
MethodDefinition(const StringName &p_name)
|
||||||
|
: name(p_name) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
MethodDefinition D_METHOD(const char *p_name);
|
MethodDefinition D_METHOD(const char *p_name);
|
||||||
|
|
|
@ -31,21 +31,20 @@
|
||||||
|
|
||||||
CoreStringNames *CoreStringNames::singleton = NULL;
|
CoreStringNames *CoreStringNames::singleton = NULL;
|
||||||
|
|
||||||
CoreStringNames::CoreStringNames() {
|
CoreStringNames::CoreStringNames()
|
||||||
|
: _free(StaticCString::create("free")),
|
||||||
_free = StaticCString::create("free");
|
changed(StaticCString::create("changed")),
|
||||||
changed = StaticCString::create("changed");
|
_meta(StaticCString::create("__meta__")),
|
||||||
_meta = StaticCString::create("__meta__");
|
_script(StaticCString::create("script")),
|
||||||
_script = StaticCString::create("script");
|
script_changed(StaticCString::create("script_changed")),
|
||||||
script_changed = StaticCString::create("script_changed");
|
___pdcdata(StaticCString::create("___pdcdata")),
|
||||||
___pdcdata = StaticCString::create("___pdcdata");
|
__getvar(StaticCString::create("__getvar")),
|
||||||
__getvar = StaticCString::create("__getvar");
|
_iter_init(StaticCString::create("_iter_init")),
|
||||||
_iter_init = StaticCString::create("_iter_init");
|
_iter_next(StaticCString::create("_iter_next")),
|
||||||
_iter_next = StaticCString::create("_iter_next");
|
_iter_get(StaticCString::create("_iter_get")),
|
||||||
_iter_get = StaticCString::create("_iter_get");
|
get_rid(StaticCString::create("get_rid")),
|
||||||
get_rid = StaticCString::create("get_rid");
|
|
||||||
_custom_features = StaticCString::create("_custom_features");
|
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
_sections_unfolded = StaticCString::create("_sections_unfolded");
|
_sections_unfolded(StaticCString::create("_sections_unfolded")),
|
||||||
#endif
|
#endif
|
||||||
|
_custom_features(StaticCString::create("_custom_features")) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,10 +61,10 @@ public:
|
||||||
StringName _iter_next;
|
StringName _iter_next;
|
||||||
StringName _iter_get;
|
StringName _iter_get;
|
||||||
StringName get_rid;
|
StringName get_rid;
|
||||||
StringName _custom_features;
|
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
StringName _sections_unfolded;
|
StringName _sections_unfolded;
|
||||||
#endif
|
#endif
|
||||||
|
StringName _custom_features;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SCENE_STRING_NAMES_H
|
#endif // SCENE_STRING_NAMES_H
|
||||||
|
|
|
@ -96,9 +96,9 @@ public:
|
||||||
TData data;
|
TData data;
|
||||||
|
|
||||||
Pair() {}
|
Pair() {}
|
||||||
Pair(const TKey &p_key, const TData &p_data) {
|
Pair(const TKey &p_key, const TData &p_data)
|
||||||
key = p_key;
|
: key(p_key),
|
||||||
data = p_data;
|
data(p_data) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -308,10 +308,9 @@ bool FileAccessPack::file_exists(const String &p_name) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
FileAccessPack::FileAccessPack(const String &p_path, const PackedData::PackedFile &p_file) {
|
FileAccessPack::FileAccessPack(const String &p_path, const PackedData::PackedFile &p_file)
|
||||||
|
: pf(p_file),
|
||||||
pf = p_file;
|
f(FileAccess::open(pf.pack, FileAccess::READ)) {
|
||||||
f = FileAccess::open(pf.pack, FileAccess::READ);
|
|
||||||
if (!f) {
|
if (!f) {
|
||||||
ERR_EXPLAIN("Can't open pack-referenced file: " + String(pf.pack));
|
ERR_EXPLAIN("Can't open pack-referenced file: " + String(pf.pack));
|
||||||
ERR_FAIL_COND(!f);
|
ERR_FAIL_COND(!f);
|
||||||
|
|
|
@ -85,9 +85,9 @@ public:
|
||||||
PropertyInfo option;
|
PropertyInfo option;
|
||||||
Variant default_value;
|
Variant default_value;
|
||||||
|
|
||||||
ImportOption(const PropertyInfo &p_info, const Variant &p_default) {
|
ImportOption(const PropertyInfo &p_info, const Variant &p_default)
|
||||||
option = p_info;
|
: option(p_info),
|
||||||
default_value = p_default;
|
default_value(p_default) {
|
||||||
}
|
}
|
||||||
ImportOption() {}
|
ImportOption() {}
|
||||||
};
|
};
|
||||||
|
|
|
@ -577,12 +577,11 @@ BSP_Tree::BSP_Tree(const PoolVector<Face3> &p_faces, real_t p_error_radius) {
|
||||||
error_radius = 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) {
|
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),
|
||||||
nodes = p_nodes;
|
planes(p_planes),
|
||||||
planes = p_planes;
|
aabb(p_aabb),
|
||||||
aabb = p_aabb;
|
error_radius(p_error_radius) {
|
||||||
error_radius = p_error_radius;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BSP_Tree::~BSP_Tree() {
|
BSP_Tree::~BSP_Tree() {
|
||||||
|
|
|
@ -378,13 +378,13 @@ struct Rect2 {
|
||||||
operator String() const { return String(position) + ", " + String(size); }
|
operator String() const { return String(position) + ", " + String(size); }
|
||||||
|
|
||||||
Rect2() {}
|
Rect2() {}
|
||||||
Rect2(real_t p_x, real_t p_y, real_t p_width, real_t 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);
|
: position(Point2(p_x, p_y)),
|
||||||
size = Size2(p_width, p_height);
|
size(Size2(p_width, p_height)) {
|
||||||
}
|
}
|
||||||
Rect2(const Point2 &p_pos, const Size2 &p_size) {
|
Rect2(const Point2 &p_pos, const Size2 &p_size)
|
||||||
position = p_pos;
|
: position(p_pos),
|
||||||
size = p_size;
|
size(p_size) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -571,18 +571,18 @@ struct Rect2i {
|
||||||
operator String() const { return String(position) + ", " + String(size); }
|
operator String() const { return String(position) + ", " + String(size); }
|
||||||
|
|
||||||
operator Rect2() const { return Rect2(position, size); }
|
operator Rect2() const { return Rect2(position, size); }
|
||||||
Rect2i(const Rect2 &p_r2) {
|
Rect2i(const Rect2 &p_r2)
|
||||||
position = p_r2.position;
|
: position(p_r2.position),
|
||||||
size = p_r2.size;
|
size(p_r2.size) {
|
||||||
}
|
}
|
||||||
Rect2i() {}
|
Rect2i() {}
|
||||||
Rect2i(int p_x, int p_y, int p_width, int p_height) {
|
Rect2i(int p_x, int p_y, int p_width, int p_height)
|
||||||
position = Point2(p_x, p_y);
|
: position(Point2(p_x, p_y)),
|
||||||
size = Size2(p_width, p_height);
|
size(Size2(p_width, p_height)) {
|
||||||
}
|
}
|
||||||
Rect2i(const Point2 &p_pos, const Size2 &p_size) {
|
Rect2i(const Point2 &p_pos, const Size2 &p_size)
|
||||||
position = p_pos;
|
: position(p_pos),
|
||||||
size = p_size;
|
size(p_size) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,8 @@ public:
|
||||||
|
|
||||||
_FORCE_INLINE_ Plane() { d = 0; }
|
_FORCE_INLINE_ Plane() { d = 0; }
|
||||||
_FORCE_INLINE_ Plane(real_t p_a, real_t p_b, real_t p_c, real_t p_d)
|
_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_normal, real_t p_d);
|
||||||
_FORCE_INLINE_ Plane(const Vector3 &p_point, const Vector3 &p_normal);
|
_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);
|
return (dist <= _epsilon);
|
||||||
}
|
}
|
||||||
|
|
||||||
Plane::Plane(const Vector3 &p_normal, real_t p_d) {
|
Plane::Plane(const Vector3 &p_normal, real_t p_d)
|
||||||
|
: normal(p_normal),
|
||||||
normal = p_normal;
|
d(p_d) {
|
||||||
d = p_d;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Plane::Plane(const Vector3 &p_point, const Vector3 &p_normal) {
|
Plane::Plane(const Vector3 &p_point, const Vector3 &p_normal)
|
||||||
|
: normal(p_normal),
|
||||||
normal = p_normal;
|
d(p_normal.dot(p_point)) {
|
||||||
d = p_normal.dot(p_point);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Plane::Plane(const Vector3 &p_point1, const Vector3 &p_point2, const Vector3 &p_point3, ClockDirection p_dir) {
|
Plane::Plane(const Vector3 &p_point1, const Vector3 &p_point2, const Vector3 &p_point3, ClockDirection p_dir) {
|
||||||
|
|
|
@ -101,9 +101,9 @@ public:
|
||||||
operator String() const;
|
operator String() const;
|
||||||
|
|
||||||
_FORCE_INLINE_ Rect3() {}
|
_FORCE_INLINE_ Rect3() {}
|
||||||
inline Rect3(const Vector3 &p_pos, const Vector3 &p_size) {
|
inline Rect3(const Vector3 &p_pos, const Vector3 &p_size)
|
||||||
position = p_pos;
|
: position(p_pos),
|
||||||
size = p_size;
|
size(p_size) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -208,8 +208,7 @@ Transform::operator String() const {
|
||||||
return basis.operator String() + " - " + origin.operator String();
|
return basis.operator String() + " - " + origin.operator String();
|
||||||
}
|
}
|
||||||
|
|
||||||
Transform::Transform(const Basis &p_basis, const Vector3 &p_origin) {
|
Transform::Transform(const Basis &p_basis, const Vector3 &p_origin)
|
||||||
|
: basis(p_basis),
|
||||||
basis = p_basis;
|
origin(p_origin) {
|
||||||
origin = p_origin;
|
|
||||||
}
|
}
|
||||||
|
|
130
core/object.cpp
130
core/object.cpp
|
@ -122,10 +122,9 @@ MethodInfo::operator Dictionary() const {
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
MethodInfo::MethodInfo() {
|
MethodInfo::MethodInfo()
|
||||||
|
: flags(METHOD_FLAG_NORMAL),
|
||||||
id = 0;
|
id(0) {
|
||||||
flags = METHOD_FLAG_NORMAL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MethodInfo MethodInfo::from_dict(const Dictionary &p_dict) {
|
MethodInfo MethodInfo::from_dict(const Dictionary &p_dict) {
|
||||||
|
@ -161,125 +160,114 @@ MethodInfo MethodInfo::from_dict(const Dictionary &p_dict) {
|
||||||
return mi;
|
return mi;
|
||||||
}
|
}
|
||||||
|
|
||||||
MethodInfo::MethodInfo(const String &p_name) {
|
MethodInfo::MethodInfo(const String &p_name)
|
||||||
|
: name(p_name),
|
||||||
id = 0;
|
flags(METHOD_FLAG_NORMAL),
|
||||||
name = p_name;
|
id(0) {
|
||||||
flags = METHOD_FLAG_NORMAL;
|
|
||||||
}
|
}
|
||||||
MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1) {
|
MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1)
|
||||||
|
: name(p_name),
|
||||||
id = 0;
|
flags(METHOD_FLAG_NORMAL),
|
||||||
name = p_name;
|
id(0) {
|
||||||
arguments.push_back(p_param1);
|
arguments.push_back(p_param1);
|
||||||
flags = METHOD_FLAG_NORMAL;
|
|
||||||
}
|
}
|
||||||
MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2) {
|
MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2)
|
||||||
|
: name(p_name),
|
||||||
id = 0;
|
flags(METHOD_FLAG_NORMAL),
|
||||||
name = p_name;
|
id(0) {
|
||||||
arguments.push_back(p_param1);
|
arguments.push_back(p_param1);
|
||||||
arguments.push_back(p_param2);
|
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) {
|
MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3)
|
||||||
|
: name(p_name),
|
||||||
id = 0;
|
flags(METHOD_FLAG_NORMAL),
|
||||||
name = p_name;
|
id(0) {
|
||||||
arguments.push_back(p_param1);
|
arguments.push_back(p_param1);
|
||||||
arguments.push_back(p_param2);
|
arguments.push_back(p_param2);
|
||||||
arguments.push_back(p_param3);
|
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) {
|
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),
|
||||||
id = 0;
|
flags(METHOD_FLAG_NORMAL),
|
||||||
name = p_name;
|
id(0) {
|
||||||
arguments.push_back(p_param1);
|
arguments.push_back(p_param1);
|
||||||
arguments.push_back(p_param2);
|
arguments.push_back(p_param2);
|
||||||
arguments.push_back(p_param3);
|
arguments.push_back(p_param3);
|
||||||
arguments.push_back(p_param4);
|
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) {
|
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),
|
||||||
name = p_name;
|
flags(METHOD_FLAG_NORMAL),
|
||||||
|
id(0) {
|
||||||
arguments.push_back(p_param1);
|
arguments.push_back(p_param1);
|
||||||
arguments.push_back(p_param2);
|
arguments.push_back(p_param2);
|
||||||
arguments.push_back(p_param3);
|
arguments.push_back(p_param3);
|
||||||
arguments.push_back(p_param4);
|
arguments.push_back(p_param4);
|
||||||
arguments.push_back(p_param5);
|
arguments.push_back(p_param5);
|
||||||
flags = METHOD_FLAG_NORMAL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MethodInfo::MethodInfo(Variant::Type ret) {
|
MethodInfo::MethodInfo(Variant::Type ret)
|
||||||
|
: flags(METHOD_FLAG_NORMAL),
|
||||||
id = 0;
|
id(0) {
|
||||||
flags = METHOD_FLAG_NORMAL;
|
|
||||||
return_val.type = ret;
|
return_val.type = ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
MethodInfo::MethodInfo(Variant::Type ret, const String &p_name) {
|
MethodInfo::MethodInfo(Variant::Type ret, const String &p_name)
|
||||||
|
: name(p_name),
|
||||||
id = 0;
|
flags(METHOD_FLAG_NORMAL),
|
||||||
name = p_name;
|
id(0) {
|
||||||
flags = METHOD_FLAG_NORMAL;
|
|
||||||
return_val.type = ret;
|
return_val.type = ret;
|
||||||
}
|
}
|
||||||
MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1) {
|
MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1)
|
||||||
|
: name(p_name),
|
||||||
id = 0;
|
flags(METHOD_FLAG_NORMAL),
|
||||||
name = p_name;
|
id(0) {
|
||||||
|
return_val.type = ret;
|
||||||
arguments.push_back(p_param1);
|
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) {
|
MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2)
|
||||||
|
: name(p_name),
|
||||||
id = 0;
|
flags(METHOD_FLAG_NORMAL),
|
||||||
name = p_name;
|
id(0) {
|
||||||
|
return_val.type = ret;
|
||||||
arguments.push_back(p_param1);
|
arguments.push_back(p_param1);
|
||||||
arguments.push_back(p_param2);
|
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) {
|
MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3)
|
||||||
|
: name(p_name),
|
||||||
id = 0;
|
flags(METHOD_FLAG_NORMAL),
|
||||||
name = p_name;
|
id(0) {
|
||||||
|
return_val.type = ret;
|
||||||
arguments.push_back(p_param1);
|
arguments.push_back(p_param1);
|
||||||
arguments.push_back(p_param2);
|
arguments.push_back(p_param2);
|
||||||
arguments.push_back(p_param3);
|
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) {
|
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),
|
||||||
id = 0;
|
flags(METHOD_FLAG_NORMAL),
|
||||||
name = p_name;
|
id(0) {
|
||||||
|
return_val.type = ret;
|
||||||
arguments.push_back(p_param1);
|
arguments.push_back(p_param1);
|
||||||
arguments.push_back(p_param2);
|
arguments.push_back(p_param2);
|
||||||
arguments.push_back(p_param3);
|
arguments.push_back(p_param3);
|
||||||
arguments.push_back(p_param4);
|
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) {
|
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),
|
||||||
name = p_name;
|
flags(METHOD_FLAG_NORMAL),
|
||||||
|
id(0) {
|
||||||
|
return_val.type = ret;
|
||||||
arguments.push_back(p_param1);
|
arguments.push_back(p_param1);
|
||||||
arguments.push_back(p_param2);
|
arguments.push_back(p_param2);
|
||||||
arguments.push_back(p_param3);
|
arguments.push_back(p_param3);
|
||||||
arguments.push_back(p_param4);
|
arguments.push_back(p_param4);
|
||||||
arguments.push_back(p_param5);
|
arguments.push_back(p_param5);
|
||||||
flags = METHOD_FLAG_NORMAL;
|
|
||||||
return_val.type = ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Object::Connection::operator Variant() const {
|
Object::Connection::operator Variant() const {
|
||||||
|
|
|
@ -139,17 +139,17 @@ struct PropertyInfo {
|
||||||
|
|
||||||
static PropertyInfo from_dict(const Dictionary &p_dict);
|
static PropertyInfo from_dict(const Dictionary &p_dict);
|
||||||
|
|
||||||
PropertyInfo() {
|
PropertyInfo()
|
||||||
type = Variant::NIL;
|
: type(Variant::NIL),
|
||||||
hint = PROPERTY_HINT_NONE;
|
hint(PROPERTY_HINT_NONE),
|
||||||
usage = PROPERTY_USAGE_DEFAULT;
|
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) {
|
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;
|
: type(p_type),
|
||||||
name = p_name;
|
name(p_name),
|
||||||
hint = p_hint;
|
hint(p_hint),
|
||||||
hint_string = p_hint_string;
|
hint_string(p_hint_string),
|
||||||
usage = p_usage;
|
usage(p_usage) {
|
||||||
}
|
}
|
||||||
bool operator<(const PropertyInfo &p_info) const {
|
bool operator<(const PropertyInfo &p_info) const {
|
||||||
return name < p_info.name;
|
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); }
|
_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) {
|
Target(const ObjectID &p_id, const StringName &p_method)
|
||||||
_id = p_id;
|
: _id(p_id),
|
||||||
method = p_method;
|
method(p_method) {
|
||||||
}
|
}
|
||||||
Target() { _id = 0; }
|
Target() { _id = 0; }
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,9 +37,9 @@ struct Pair {
|
||||||
S second;
|
S second;
|
||||||
|
|
||||||
Pair() {}
|
Pair() {}
|
||||||
Pair(F p_first, S p_second) {
|
Pair(F p_first, S p_second)
|
||||||
first = p_first;
|
: first(p_first),
|
||||||
second = p_second;
|
second(p_second) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -48,9 +48,9 @@ public:
|
||||||
struct Singleton {
|
struct Singleton {
|
||||||
StringName name;
|
StringName name;
|
||||||
Object *ptr;
|
Object *ptr;
|
||||||
Singleton(const StringName &p_name = StringName(), Object *p_ptr = NULL) {
|
Singleton(const StringName &p_name = StringName(), Object *p_ptr = NULL)
|
||||||
name = p_name;
|
: name(p_name),
|
||||||
ptr = p_ptr;
|
ptr(p_ptr) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
enum {
|
enum {
|
||||||
|
@ -66,18 +66,18 @@ protected:
|
||||||
Variant initial;
|
Variant initial;
|
||||||
bool hide_from_editor;
|
bool hide_from_editor;
|
||||||
bool overrided;
|
bool overrided;
|
||||||
VariantContainer() {
|
VariantContainer()
|
||||||
order = 0;
|
: order(0),
|
||||||
hide_from_editor = false;
|
persist(false),
|
||||||
persist = false;
|
hide_from_editor(false),
|
||||||
overrided = false;
|
overrided(false) {
|
||||||
}
|
}
|
||||||
VariantContainer(const Variant &p_variant, int p_order, bool p_persist = false) {
|
VariantContainer(const Variant &p_variant, int p_order, bool p_persist = false)
|
||||||
variant = p_variant;
|
: order(p_order),
|
||||||
order = p_order;
|
persist(p_persist),
|
||||||
hide_from_editor = false;
|
variant(p_variant),
|
||||||
persist = p_persist;
|
hide_from_editor(false),
|
||||||
overrided = false;
|
overrided(false) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -940,29 +940,32 @@ void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p
|
||||||
|
|
||||||
ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL;
|
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_stream_peer(tcp_client);
|
||||||
packet_peer_stream->set_output_buffer_max_size(1024 * 1024 * 8); //8mb should be way more than enough
|
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.printfunc = _print_handler;
|
||||||
phl.userdata = this;
|
phl.userdata = this;
|
||||||
add_print_handler(&phl);
|
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.errfunc = _err_handler;
|
||||||
eh.userdata = this;
|
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.resize(CLAMP(int(ProjectSettings::get_singleton()->get("debug/settings/profiler/max_functions")), 128, 65535));
|
||||||
profile_info_ptrs.resize(profile_info.size());
|
profile_info_ptrs.resize(profile_info.size());
|
||||||
profiling = false;
|
|
||||||
max_frame_functions = 16;
|
|
||||||
reload_all_scripts = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptDebuggerRemote::~ScriptDebuggerRemote() {
|
ScriptDebuggerRemote::~ScriptDebuggerRemote() {
|
||||||
|
|
|
@ -384,11 +384,10 @@ void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, c
|
||||||
//change notify
|
//change notify
|
||||||
}
|
}
|
||||||
|
|
||||||
PlaceHolderScriptInstance::PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref<Script> p_script, Object *p_owner) {
|
PlaceHolderScriptInstance::PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref<Script> p_script, Object *p_owner)
|
||||||
|
: owner(p_owner),
|
||||||
language = p_language;
|
language(p_language),
|
||||||
script = p_script;
|
script(p_script) {
|
||||||
owner = p_owner;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PlaceHolderScriptInstance::~PlaceHolderScriptInstance() {
|
PlaceHolderScriptInstance::~PlaceHolderScriptInstance() {
|
||||||
|
|
|
@ -923,9 +923,8 @@ void Translation::_bind_methods() {
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::STRING, "locale"), "set_locale", "get_locale");
|
ADD_PROPERTY(PropertyInfo(Variant::STRING, "locale"), "set_locale", "get_locale");
|
||||||
}
|
}
|
||||||
|
|
||||||
Translation::Translation() {
|
Translation::Translation()
|
||||||
|
: locale("en") {
|
||||||
locale = "en";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////
|
///////////////////////////////////////////////
|
||||||
|
@ -1144,9 +1143,8 @@ void TranslationServer::load_translations() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TranslationServer::TranslationServer() {
|
TranslationServer::TranslationServer()
|
||||||
|
: locale("en"),
|
||||||
|
enabled(true) {
|
||||||
singleton = this;
|
singleton = this;
|
||||||
locale = "en";
|
|
||||||
enabled = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,9 +130,9 @@ struct _VariantCall {
|
||||||
StringName name;
|
StringName name;
|
||||||
Variant::Type type;
|
Variant::Type type;
|
||||||
Arg() { type = Variant::NIL; }
|
Arg() { type = Variant::NIL; }
|
||||||
Arg(Variant::Type p_type, const StringName &p_name) {
|
Arg(Variant::Type p_type, const StringName &p_name)
|
||||||
name = p_name;
|
: name(p_name),
|
||||||
type = p_type;
|
type(p_type) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -57,9 +57,9 @@ class Navigation2D : public Node2D {
|
||||||
return (a.key == p_key.a.key) ? (b.key < p_key.b.key) : (a.key < p_key.a.key);
|
return (a.key == p_key.a.key) ? (b.key < p_key.b.key) : (a.key < p_key.a.key);
|
||||||
};
|
};
|
||||||
|
|
||||||
EdgeKey(const Point &p_a = Point(), const Point &p_b = Point()) {
|
EdgeKey(const Point &p_a = Point(), const Point &p_b = Point())
|
||||||
a = p_a;
|
: a(p_a),
|
||||||
b = p_b;
|
b(p_b) {
|
||||||
if (a.key > b.key) {
|
if (a.key > b.key) {
|
||||||
SWAP(a, b);
|
SWAP(a, b);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,9 +58,9 @@ class Navigation : public Spatial {
|
||||||
return (a.key == p_key.a.key) ? (b.key < p_key.b.key) : (a.key < p_key.a.key);
|
return (a.key == p_key.a.key) ? (b.key < p_key.b.key) : (a.key < p_key.a.key);
|
||||||
};
|
};
|
||||||
|
|
||||||
EdgeKey(const Point &p_a = Point(), const Point &p_b = Point()) {
|
EdgeKey(const Point &p_a = Point(), const Point &p_b = Point())
|
||||||
a = p_a;
|
: a(p_a),
|
||||||
b = p_b;
|
b(p_b) {
|
||||||
if (a.key > b.key) {
|
if (a.key > b.key) {
|
||||||
SWAP(a, b);
|
SWAP(a, b);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue