summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/class_db.h8
-rw-r--r--core/core_string_names.cpp28
-rw-r--r--core/dvector.h2
-rw-r--r--core/engine.h6
-rw-r--r--core/global_constants.cpp14
-rw-r--r--core/hash_map.h6
-rw-r--r--core/helper/math_fieldwise.cpp9
-rw-r--r--core/io/file_access_pack.cpp6
-rw-r--r--core/io/marshalls.cpp4
-rw-r--r--core/io/resource_import.h6
-rw-r--r--core/math/a_star.h4
-rw-r--r--core/math/aabb.h6
-rw-r--r--core/math/bsp_tree.cpp10
-rw-r--r--core/math/face3.cpp3
-rw-r--r--core/math/face3.h2
-rw-r--r--core/math/math_2d.h30
-rw-r--r--core/math/math_funcs.h2
-rw-r--r--core/math/plane.h18
-rw-r--r--core/math/transform.cpp6
-rw-r--r--core/object.cpp168
-rw-r--r--core/object.h38
-rw-r--r--core/ordered_hash_map.h26
-rw-r--r--core/os/os.h2
-rw-r--r--core/pair.h6
-rw-r--r--core/project_settings.h22
-rw-r--r--core/resource.cpp4
-rw-r--r--core/safe_refcount.cpp8
-rw-r--r--core/script_debugger_remote.cpp38
-rw-r--r--core/script_language.cpp8
-rw-r--r--core/translation.cpp10
-rw-r--r--core/typedefs.h6
-rw-r--r--core/variant.cpp6
-rw-r--r--core/variant_call.cpp6
33 files changed, 256 insertions, 262 deletions
diff --git a/core/class_db.h b/core/class_db.h
index 24db4c61bb..b8b681301d 100644
--- a/core/class_db.h
+++ b/core/class_db.h
@@ -49,10 +49,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 feee39225f..3091c80607 100644
--- a/core/core_string_names.cpp
+++ b/core/core_string_names.cpp
@@ -31,22 +31,22 @@
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")),
+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")) {
+ _custom_features(StaticCString::create("_custom_features")) {
x = StaticCString::create("x");
y = StaticCString::create("y");
diff --git a/core/dvector.h b/core/dvector.h
index 1b81ceec5e..66bf0e7862 100644
--- a/core/dvector.h
+++ b/core/dvector.h
@@ -149,7 +149,7 @@ class PoolVector {
}
if (old_alloc->refcount.unref() == true) {
-//this should never happen but..
+ //this should never happen but..
#ifdef DEBUG_ENABLED
MemoryPool::alloc_mutex->lock();
diff --git a/core/engine.h b/core/engine.h
index 4a573c1539..1becebe34a 100644
--- a/core/engine.h
+++ b/core/engine.h
@@ -41,9 +41,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) {
}
};
diff --git a/core/global_constants.cpp b/core/global_constants.cpp
index fb432b85db..a8f6e4da6c 100644
--- a/core/global_constants.cpp
+++ b/core/global_constants.cpp
@@ -45,15 +45,15 @@ struct _GlobalConstant {
_GlobalConstant() {}
#ifdef DEBUG_METHODS_ENABLED
- _GlobalConstant(const StringName &p_enum_name, const char *p_name, int p_value)
- : enum_name(p_enum_name),
- name(p_name),
- value(p_value) {
+ _GlobalConstant(const StringName &p_enum_name, const char *p_name, int p_value) :
+ enum_name(p_enum_name),
+ name(p_name),
+ value(p_value) {
}
#else
- _GlobalConstant(const char *p_name, int p_value)
- : name(p_name),
- value(p_value) {
+ _GlobalConstant(const char *p_name, int p_value) :
+ name(p_name),
+ value(p_value) {
}
#endif
};
diff --git a/core/hash_map.h b/core/hash_map.h
index e100d7a904..a53cb53c84 100644
--- a/core/hash_map.h
+++ b/core/hash_map.h
@@ -63,9 +63,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/helper/math_fieldwise.cpp b/core/helper/math_fieldwise.cpp
index 2cd8a4f392..9e5eab2ee8 100644
--- a/core/helper/math_fieldwise.cpp
+++ b/core/helper/math_fieldwise.cpp
@@ -44,10 +44,10 @@ Variant fieldwise_assign(const Variant &p_target, const Variant &p_source, const
ERR_FAIL_COND_V(p_target.get_type() != p_source.get_type(), p_target);
- switch (p_source.get_type()) {
+ /* clang-format makes a mess of this macro usage */
+ /* clang-format off */
- /* clang-format makes a mess of this macro usage */
- /* clang-format off */
+ switch (p_source.get_type()) {
case Variant::VECTOR2: {
@@ -174,9 +174,8 @@ Variant fieldwise_assign(const Variant &p_target, const Variant &p_source, const
default: {
ERR_FAIL_V(p_target);
}
-
- /* clang-format on */
}
+ /* clang-format on */
}
#endif // TOOLS_ENABLED
diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp
index a7eb8ce6a9..c46e645ed8 100644
--- a/core/io/file_access_pack.cpp
+++ b/core/io/file_access_pack.cpp
@@ -313,9 +313,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/marshalls.cpp b/core/io/marshalls.cpp
index 37320d7a77..7dd3468c48 100644
--- a/core/io/marshalls.cpp
+++ b/core/io/marshalls.cpp
@@ -159,8 +159,8 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
r_variant = str;
} break;
- // math types
+ // math types
case Variant::VECTOR2: {
ERR_FAIL_COND_V(len < (int)4 * 2, ERR_INVALID_DATA);
@@ -959,8 +959,8 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
_encode_string(p_variant, buf, r_len);
} break;
- // math types
+ // math types
case Variant::VECTOR2: {
if (buf) {
diff --git a/core/io/resource_import.h b/core/io/resource_import.h
index 28489b5d34..166fff85cf 100644
--- a/core/io/resource_import.h
+++ b/core/io/resource_import.h
@@ -90,9 +90,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/a_star.h b/core/math/a_star.h
index b7b7e54125..1f13f4fae8 100644
--- a/core/math/a_star.h
+++ b/core/math/a_star.h
@@ -59,8 +59,8 @@ class AStar : public Reference {
Point *prev_point;
real_t distance;
- Point()
- : list(this) {}
+ Point() :
+ list(this) {}
};
Map<int, Point *> points;
diff --git a/core/math/aabb.h b/core/math/aabb.h
index c60213496a..c5ba79e172 100644
--- a/core/math/aabb.h
+++ b/core/math/aabb.h
@@ -101,9 +101,9 @@ public:
operator String() const;
_FORCE_INLINE_ AABB() {}
- inline AABB(const Vector3 &p_pos, const Vector3 &p_size)
- : position(p_pos),
- size(p_size) {
+ inline AABB(const Vector3 &p_pos, const Vector3 &p_size) :
+ position(p_pos),
+ size(p_size) {
}
};
diff --git a/core/math/bsp_tree.cpp b/core/math/bsp_tree.cpp
index bdc040160f..ecda777583 100644
--- a/core/math/bsp_tree.cpp
+++ b/core/math/bsp_tree.cpp
@@ -577,11 +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 AABB &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 AABB &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/face3.cpp b/core/math/face3.cpp
index 070ce77db4..7e586a1fd2 100644
--- a/core/math/face3.cpp
+++ b/core/math/face3.cpp
@@ -195,9 +195,8 @@ bool Face3::intersects_aabb(const AABB &p_aabb) const {
if (!p_aabb.intersects_plane(get_plane()))
return false;
- /** TEST FACE AXIS */
-
#define TEST_AXIS(m_ax) \
+ /** TEST FACE AXIS */ \
{ \
real_t aabb_min = p_aabb.position.m_ax; \
real_t aabb_max = p_aabb.position.m_ax + p_aabb.size.m_ax; \
diff --git a/core/math/face3.h b/core/math/face3.h
index 561fa31238..9a1f6b2c2e 100644
--- a/core/math/face3.h
+++ b/core/math/face3.h
@@ -256,6 +256,4 @@ bool Face3::intersects_aabb2(const AABB &p_aabb) const {
return true;
}
- //this sucks...
-
#endif // FACE3_H
diff --git a/core/math/math_2d.h b/core/math/math_2d.h
index d215df8a43..d788318f5e 100644
--- a/core/math/math_2d.h
+++ b/core/math/math_2d.h
@@ -385,13 +385,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) {
}
};
@@ -578,18 +578,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/math_funcs.h b/core/math/math_funcs.h
index bc0b3717ed..80e5805451 100644
--- a/core/math/math_funcs.h
+++ b/core/math/math_funcs.h
@@ -272,7 +272,7 @@ public:
#elif defined(_MSC_VER) && _MSC_VER < 1800
__asm fld a __asm fistp b
-/*#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) )
+ /*#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) )
// use AT&T inline assembly style, document that
// we use memory as output (=m) and input (m)
__asm__ __volatile__ (
diff --git a/core/math/plane.h b/core/math/plane.h
index 559a735817..1d02b5d523 100644
--- a/core/math/plane.h
+++ b/core/math/plane.h
@@ -74,9 +74,9 @@ public:
operator String() const;
_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){};
+ _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){};
_FORCE_INLINE_ Plane(const Vector3 &p_normal, real_t p_d);
_FORCE_INLINE_ Plane(const Vector3 &p_point, const Vector3 &p_normal);
@@ -100,14 +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/transform.cpp b/core/math/transform.cpp
index 638a39ab73..fb4ca16565 100644
--- a/core/math/transform.cpp
+++ b/core/math/transform.cpp
@@ -208,7 +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 1be7337d96..cf1472243b 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -126,9 +126,9 @@ MethodInfo::operator Dictionary() const {
return d;
}
-MethodInfo::MethodInfo()
- : flags(METHOD_FLAG_NORMAL),
- id(0) {
+MethodInfo::MethodInfo() :
+ flags(METHOD_FLAG_NORMAL),
+ id(0) {
}
MethodInfo MethodInfo::from_dict(const Dictionary &p_dict) {
@@ -164,48 +164,48 @@ MethodInfo MethodInfo::from_dict(const Dictionary &p_dict) {
return mi;
}
-MethodInfo::MethodInfo(const String &p_name)
- : name(p_name),
- flags(METHOD_FLAG_NORMAL),
- id(0) {
+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)
- : name(p_name),
- flags(METHOD_FLAG_NORMAL),
- id(0) {
+MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1) :
+ name(p_name),
+ flags(METHOD_FLAG_NORMAL),
+ id(0) {
arguments.push_back(p_param1);
}
-MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2)
- : name(p_name),
- flags(METHOD_FLAG_NORMAL),
- id(0) {
+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);
}
-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) {
+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);
}
-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) {
+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);
}
-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) {
+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);
@@ -213,48 +213,48 @@ MethodInfo::MethodInfo(const String &p_name, const PropertyInfo &p_param1, const
arguments.push_back(p_param5);
}
-MethodInfo::MethodInfo(Variant::Type ret)
- : flags(METHOD_FLAG_NORMAL),
- id(0) {
+MethodInfo::MethodInfo(Variant::Type ret) :
+ flags(METHOD_FLAG_NORMAL),
+ id(0) {
return_val.type = ret;
}
-MethodInfo::MethodInfo(Variant::Type ret, const String &p_name)
- : name(p_name),
- flags(METHOD_FLAG_NORMAL),
- id(0) {
+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)
- : name(p_name),
- flags(METHOD_FLAG_NORMAL),
- id(0) {
+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)
- : name(p_name),
- flags(METHOD_FLAG_NORMAL),
- id(0) {
+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);
}
-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) {
+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);
}
-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) {
+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);
@@ -262,10 +262,10 @@ MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyIn
arguments.push_back(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, const PropertyInfo &p_param5)
- : name(p_name),
- flags(METHOD_FLAG_NORMAL),
- id(0) {
+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);
@@ -274,56 +274,56 @@ MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyIn
arguments.push_back(p_param5);
}
-MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name)
- : name(p_name),
- flags(METHOD_FLAG_NORMAL),
- return_val(p_ret),
- id(0) {
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name) :
+ name(p_name),
+ flags(METHOD_FLAG_NORMAL),
+ return_val(p_ret),
+ id(0) {
}
-MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1)
- : name(p_name),
- return_val(p_ret),
- flags(METHOD_FLAG_NORMAL),
- id(0) {
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1) :
+ name(p_name),
+ return_val(p_ret),
+ flags(METHOD_FLAG_NORMAL),
+ id(0) {
arguments.push_back(p_param1);
}
-MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2)
- : name(p_name),
- return_val(p_ret),
- flags(METHOD_FLAG_NORMAL),
- id(0) {
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2) :
+ name(p_name),
+ return_val(p_ret),
+ flags(METHOD_FLAG_NORMAL),
+ id(0) {
arguments.push_back(p_param1);
arguments.push_back(p_param2);
}
-MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3)
- : name(p_name),
- return_val(p_ret),
- flags(METHOD_FLAG_NORMAL),
- id(0) {
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3) :
+ name(p_name),
+ return_val(p_ret),
+ flags(METHOD_FLAG_NORMAL),
+ id(0) {
arguments.push_back(p_param1);
arguments.push_back(p_param2);
arguments.push_back(p_param3);
}
-MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4)
- : name(p_name),
- return_val(p_ret),
- flags(METHOD_FLAG_NORMAL),
- id(0) {
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4) :
+ name(p_name),
+ return_val(p_ret),
+ 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);
}
-MethodInfo::MethodInfo(const PropertyInfo &p_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),
- return_val(p_ret),
- flags(METHOD_FLAG_NORMAL),
- id(0) {
+MethodInfo::MethodInfo(const PropertyInfo &p_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),
+ return_val(p_ret),
+ flags(METHOD_FLAG_NORMAL),
+ id(0) {
arguments.push_back(p_param1);
arguments.push_back(p_param2);
arguments.push_back(p_param3);
diff --git a/core/object.h b/core/object.h
index 0a0c781649..3d93953227 100644
--- a/core/object.h
+++ b/core/object.h
@@ -1,4 +1,4 @@
-/*************************************************************************/
+/*************************************************************************/
/* object.h */
/*************************************************************************/
/* This file is part of: */
@@ -144,18 +144,18 @@ 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, const StringName &p_class_name = StringName())
- : 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, const StringName &p_class_name = StringName()) :
+ type(p_type),
+ name(p_name),
+ hint(p_hint),
+ hint_string(p_hint_string),
+ usage(p_usage) {
if (hint == PROPERTY_HINT_RESOURCE_TYPE) {
class_name = hint_string;
@@ -164,11 +164,11 @@ struct PropertyInfo {
}
}
- PropertyInfo(const StringName &p_class_name)
- : type(Variant::OBJECT),
- class_name(p_class_name),
- hint(PROPERTY_HINT_NONE),
- usage(PROPERTY_USAGE_DEFAULT) {
+ PropertyInfo(const StringName &p_class_name) :
+ type(Variant::OBJECT),
+ class_name(p_class_name),
+ hint(PROPERTY_HINT_NONE),
+ usage(PROPERTY_USAGE_DEFAULT) {
}
bool operator<(const PropertyInfo &p_info) const {
@@ -428,9 +428,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/ordered_hash_map.h b/core/ordered_hash_map.h
index 1ed5a5d369..fed16809e6 100644
--- a/core/ordered_hash_map.h
+++ b/core/ordered_hash_map.h
@@ -68,8 +68,10 @@ public:
}
public:
- _FORCE_INLINE_ Element()
- : list_element(NULL), prev_element(NULL), next_element(NULL) {
+ _FORCE_INLINE_ Element() :
+ list_element(NULL),
+ prev_element(NULL),
+ next_element(NULL) {
}
Element next() const {
@@ -80,10 +82,10 @@ public:
return Element(prev_element);
}
- Element(const Element &other)
- : list_element(other.list_element),
- prev_element(other.prev_element),
- next_element(other.next_element) {
+ Element(const Element &other) :
+ list_element(other.list_element),
+ prev_element(other.prev_element),
+ next_element(other.next_element) {
}
Element &operator=(const Element &other) {
@@ -135,17 +137,17 @@ public:
const typename InternalList::Element *list_element;
- ConstElement(const typename InternalList::Element *p_element)
- : list_element(p_element) {
+ ConstElement(const typename InternalList::Element *p_element) :
+ list_element(p_element) {
}
public:
- _FORCE_INLINE_ ConstElement()
- : list_element(NULL) {
+ _FORCE_INLINE_ ConstElement() :
+ list_element(NULL) {
}
- ConstElement(const ConstElement &other)
- : list_element(other.list_element) {
+ ConstElement(const ConstElement &other) :
+ list_element(other.list_element) {
}
ConstElement &operator=(const ConstElement &other) {
diff --git a/core/os/os.h b/core/os/os.h
index 91fbf082bf..4f968020cc 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -195,7 +195,7 @@ public:
virtual void set_ime_position(const Point2 &p_pos) {}
virtual void set_ime_intermediate_text_callback(ImeCallback p_callback, void *p_inp) {}
- virtual Error open_dynamic_library(const String p_path, void *&p_library_handle,bool p_also_set_library_path=false) { return ERR_UNAVAILABLE; }
+ virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false) { return ERR_UNAVAILABLE; }
virtual Error close_dynamic_library(void *p_library_handle) { return ERR_UNAVAILABLE; }
virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional = false) { return ERR_UNAVAILABLE; }
diff --git a/core/pair.h b/core/pair.h
index 535c3355b6..aa51b77a4f 100644
--- a/core/pair.h
+++ b/core/pair.h
@@ -37,9 +37,9 @@ struct Pair {
S second;
Pair() {}
- Pair(F p_first, const S &p_second)
- : first(p_first),
- second(p_second) {
+ Pair(F p_first, const S &p_second) :
+ first(p_first),
+ second(p_second) {
}
};
diff --git a/core/project_settings.h b/core/project_settings.h
index 1c4078cebb..d8a1ea1f7a 100644
--- a/core/project_settings.h
+++ b/core/project_settings.h
@@ -58,18 +58,18 @@ protected:
Variant initial;
bool hide_from_editor;
bool overrided;
- VariantContainer()
- : order(0),
- persist(false),
- hide_from_editor(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)
- : order(p_order),
- persist(p_persist),
- variant(p_variant),
- hide_from_editor(false),
- 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/resource.cpp b/core/resource.cpp
index d339eb78ad..be6da792ad 100644
--- a/core/resource.cpp
+++ b/core/resource.cpp
@@ -378,8 +378,8 @@ void Resource::_bind_methods() {
BIND_VMETHOD(MethodInfo("_setup_local_to_scene"));
}
-Resource::Resource()
- : remapped_list(this) {
+Resource::Resource() :
+ remapped_list(this) {
#ifdef TOOLS_ENABLED
last_modified_time = 0;
diff --git a/core/safe_refcount.cpp b/core/safe_refcount.cpp
index c9acdb7970..908c8a34b5 100644
--- a/core/safe_refcount.cpp
+++ b/core/safe_refcount.cpp
@@ -57,7 +57,7 @@
return m_val; \
}
-_ALWAYS_INLINE_ uint32_t _atomic_conditional_increment_impl(register uint32_t *pw) {
+_ALWAYS_INLINE_ uint32_t _atomic_conditional_increment_impl(register uint32_t *pw){
ATOMIC_CONDITIONAL_INCREMENT_BODY(pw, LONG, InterlockedCompareExchange, uint32_t)
}
@@ -82,12 +82,12 @@ _ALWAYS_INLINE_ uint32_t _atomic_add_impl(register uint32_t *pw, register uint32
return InterlockedAdd((LONG volatile *)pw, val);
}
-_ALWAYS_INLINE_ uint32_t _atomic_exchange_if_greater_impl(register uint32_t *pw, register uint32_t val) {
+_ALWAYS_INLINE_ uint32_t _atomic_exchange_if_greater_impl(register uint32_t *pw, register uint32_t val){
ATOMIC_EXCHANGE_IF_GREATER_BODY(pw, val, LONG, InterlockedCompareExchange, uint32_t)
}
-_ALWAYS_INLINE_ uint64_t _atomic_conditional_increment_impl(register uint64_t *pw) {
+_ALWAYS_INLINE_ uint64_t _atomic_conditional_increment_impl(register uint64_t *pw){
ATOMIC_CONDITIONAL_INCREMENT_BODY(pw, LONGLONG, InterlockedCompareExchange64, uint64_t)
}
@@ -112,7 +112,7 @@ _ALWAYS_INLINE_ uint64_t _atomic_add_impl(register uint64_t *pw, register uint64
return InterlockedAdd64((LONGLONG volatile *)pw, val);
}
-_ALWAYS_INLINE_ uint64_t _atomic_exchange_if_greater_impl(register uint64_t *pw, register uint64_t val) {
+_ALWAYS_INLINE_ uint64_t _atomic_exchange_if_greater_impl(register uint64_t *pw, register uint64_t val){
ATOMIC_EXCHANGE_IF_GREATER_BODY(pw, val, LONGLONG, InterlockedCompareExchange64, uint64_t)
}
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp
index 495c99c122..658b72b47a 100644
--- a/core/script_debugger_remote.cpp
+++ b/core/script_debugger_remote.cpp
@@ -989,25 +989,25 @@ void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p
ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL;
-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(Engine::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) {
+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(Engine::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) {
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
diff --git a/core/script_language.cpp b/core/script_language.cpp
index 384e41e4bd..c1e9d55872 100644
--- a/core/script_language.cpp
+++ b/core/script_language.cpp
@@ -387,10 +387,10 @@ void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, c
//change notify
}
-PlaceHolderScriptInstance::PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref<Script> p_script, Object *p_owner)
- : owner(p_owner),
- language(p_language),
- script(p_script) {
+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 dcca58692a..515b5f1134 100644
--- a/core/translation.cpp
+++ b/core/translation.cpp
@@ -876,8 +876,8 @@ void Translation::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "locale"), "set_locale", "get_locale");
}
-Translation::Translation()
- : locale("en") {
+Translation::Translation() :
+ locale("en") {
}
///////////////////////////////////////////////
@@ -1163,9 +1163,9 @@ void TranslationServer::load_translations() {
}
}
-TranslationServer::TranslationServer()
- : locale("en"),
- enabled(true) {
+TranslationServer::TranslationServer() :
+ locale("en"),
+ enabled(true) {
singleton = this;
for (int i = 0; locale_list[i]; ++i) {
diff --git a/core/typedefs.h b/core/typedefs.h
index c509edf9fe..889513ddc9 100644
--- a/core/typedefs.h
+++ b/core/typedefs.h
@@ -73,7 +73,7 @@ T *_nullptr() {
#define OFFSET_OF(st, m) \
((size_t)((char *)&(_nullptr<st>()->m) - (char *)0))
-/**
+ /**
* Some platforms (devices) not define NULL
*/
@@ -81,7 +81,7 @@ T *_nullptr() {
#define NULL 0
#endif
-/**
+ /**
* Windows defines a lot of badly stuff we'll never ever use. undefine it.
*/
@@ -103,7 +103,7 @@ T *_nullptr() {
#include "error_list.h"
#include "error_macros.h"
-/** Generic ABS function, for math uses please use Math::abs */
+ /** Generic ABS function, for math uses please use Math::abs */
#ifndef ABS
#define ABS(m_v) ((m_v < 0) ? (-(m_v)) : (m_v))
diff --git a/core/variant.cpp b/core/variant.cpp
index 0f97b98a6f..7f0cabbce4 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -67,7 +67,6 @@ String Variant::get_type_name(Variant::Type p_type) {
} break;
// math types
-
case VECTOR2: {
return "Vector2";
@@ -725,7 +724,6 @@ bool Variant::is_zero() const {
} break;
// math types
-
case VECTOR2: {
return *reinterpret_cast<const Vector2 *>(_data._mem) == Vector2();
@@ -934,7 +932,6 @@ void Variant::reference(const Variant &p_variant) {
} break;
// math types
-
case VECTOR2: {
memnew_placement(_data._mem, Vector2(*reinterpret_cast<const Vector2 *>(p_variant._data._mem)));
@@ -2506,7 +2503,6 @@ void Variant::operator=(const Variant &p_variant) {
} break;
// math types
-
case VECTOR2: {
*reinterpret_cast<Vector2 *>(_data._mem) = *reinterpret_cast<const Vector2 *>(p_variant._data._mem);
@@ -2645,8 +2641,8 @@ uint32_t Variant::hash() const {
return reinterpret_cast<const String *>(_data._mem)->hash();
} break;
- // math types
+ // math types
case VECTOR2: {
uint32_t hash = hash_djb2_one_float(reinterpret_cast<const Vector2 *>(_data._mem)->x);
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index 10f5ca0ce1..991573e8d7 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) {
}
};