diff --git a/core/class_db.h b/core/class_db.h index 24db4c61bb8..b8b681301d3 100644 --- a/core/class_db.h +++ b/core/class_db.h @@ -49,10 +49,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 feee39225ff..3091c806071 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 1b81ceec5e5..66bf0e78620 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 4a573c15398..1becebe34ac 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 fb432b85db0..a8f6e4da6ce 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 e100d7a9044..a53cb53c84c 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 27acd40cd8b..9e5eab2ee82 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 a7eb8ce6a92..c46e645ed8d 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 be49e05be0d..7dd3468c48e 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 28489b5d34c..166fff85cfd 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 b7b7e541255..1f13f4fae86 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 points; diff --git a/core/math/aabb.h b/core/math/aabb.h index c60213496a5..c5ba79e1720 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 bdc040160f9..ecda7775837 100644 --- a/core/math/bsp_tree.cpp +++ b/core/math/bsp_tree.cpp @@ -577,11 +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 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 &p_nodes, const Vector &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 2335b458bff..7e586a1fd26 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/math_2d.h b/core/math/math_2d.h index d215df8a435..d788318f5e5 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 bc0b3717ed2..80e5805451a 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 559a735817c..1d02b5d523b 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 638a39ab731..fb4ca16565b 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 1be7337d96d..cf1472243ba 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 0a0c781649a..3d939532275 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 1ed5a5d3693..fed16809e68 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/pair.h b/core/pair.h index 535c3355b65..aa51b77a4f0 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 1c4078cebb4..d8a1ea1f7a7 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 d339eb78ad6..be6da792ad9 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 c9acdb79706..908c8a34b5c 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 495c99c122d..658b72b47ad 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(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(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 384e41e4bd7..c1e9d558726 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -387,10 +387,10 @@ void PlaceHolderScriptInstance::update(const List &p_properties, c //change notify } -PlaceHolderScriptInstance::PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref