diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-12-06 21:36:34 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-12-07 08:02:00 +0100 |
commit | 13c2ff932089db24841bb971b645141218bd8586 (patch) | |
tree | 1fc056e9e5531b9d039ecfcf19602cdce33222d2 /scene | |
parent | a8ceb7e3f213216e4fb103a6a8687d007632f788 (diff) |
Style: Apply new clang-format 5.0 style to all files
Diffstat (limited to 'scene')
40 files changed, 130 insertions, 126 deletions
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp index 9ee77a710c..80f9bf0f9f 100644 --- a/scene/2d/area_2d.cpp +++ b/scene/2d/area_2d.cpp @@ -688,8 +688,8 @@ void Area2D::_bind_methods() { BIND_ENUM_CONSTANT(SPACE_OVERRIDE_REPLACE_COMBINE); } -Area2D::Area2D() - : CollisionObject2D(Physics2DServer::get_singleton()->area_create(), true) { +Area2D::Area2D() : + CollisionObject2D(Physics2DServer::get_singleton()->area_create(), true) { space_override = SPACE_OVERRIDE_DISABLED; set_gravity(98); diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 9a3debbe90..768d5185d7 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -211,8 +211,8 @@ void CanvasItemMaterial::_bind_methods() { BIND_ENUM_CONSTANT(LIGHT_MODE_LIGHT_ONLY); } -CanvasItemMaterial::CanvasItemMaterial() - : element(this) { +CanvasItemMaterial::CanvasItemMaterial() : + element(this) { blend_mode = BLEND_MODE_MIX; light_mode = LIGHT_MODE_NORMAL; @@ -1131,8 +1131,8 @@ Rect2 CanvasItem::_edit_get_item_and_children_rect() const { return rect; } -CanvasItem::CanvasItem() - : xform_change(this) { +CanvasItem::CanvasItem() : + xform_change(this) { canvas_item = VisualServer::get_singleton()->canvas_item_create(); visible = true; diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp index 9131223ff3..57a0e15447 100644 --- a/scene/2d/line_2d.cpp +++ b/scene/2d/line_2d.cpp @@ -37,8 +37,8 @@ VARIANT_ENUM_CAST(Line2D::LineJointMode) VARIANT_ENUM_CAST(Line2D::LineCapMode) VARIANT_ENUM_CAST(Line2D::LineTextureMode) -Line2D::Line2D() - : Node2D() { +Line2D::Line2D() : + Node2D() { _joint_mode = LINE_JOINT_SHARP; _begin_cap_mode = LINE_CAP_NONE; _end_cap_mode = LINE_CAP_NONE; diff --git a/scene/2d/navigation2d.h b/scene/2d/navigation2d.h index e87b01f7c5..bb97e1a9a9 100644 --- a/scene/2d/navigation2d.h +++ b/scene/2d/navigation2d.h @@ -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); }; - EdgeKey(const Point &p_a = Point(), const Point &p_b = Point()) - : a(p_a), - b(p_b) { + EdgeKey(const Point &p_a = Point(), const Point &p_b = Point()) : + a(p_a), + b(p_b) { if (a.key > b.key) { SWAP(a, b); } diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 1f6127e6eb..a1a1101b11 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -132,8 +132,8 @@ bool PhysicsBody2D::get_collision_layer_bit(int p_bit) const { return get_collision_layer() & (1 << p_bit); } -PhysicsBody2D::PhysicsBody2D(Physics2DServer::BodyMode p_mode) - : CollisionObject2D(Physics2DServer::get_singleton()->body_create(), false) { +PhysicsBody2D::PhysicsBody2D(Physics2DServer::BodyMode p_mode) : + CollisionObject2D(Physics2DServer::get_singleton()->body_create(), false) { Physics2DServer::get_singleton()->body_set_mode(get_rid(), p_mode); collision_layer = 1; @@ -226,8 +226,8 @@ void StaticBody2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_bounce", "get_bounce"); } -StaticBody2D::StaticBody2D() - : PhysicsBody2D(Physics2DServer::BODY_MODE_STATIC) { +StaticBody2D::StaticBody2D() : + PhysicsBody2D(Physics2DServer::BODY_MODE_STATIC) { constant_angular_velocity = 0; bounce = 0; @@ -921,8 +921,8 @@ void RigidBody2D::_bind_methods() { BIND_ENUM_CONSTANT(CCD_MODE_CAST_SHAPE); } -RigidBody2D::RigidBody2D() - : PhysicsBody2D(Physics2DServer::BODY_MODE_RIGID) { +RigidBody2D::RigidBody2D() : + PhysicsBody2D(Physics2DServer::BODY_MODE_RIGID) { mode = MODE_RIGID; @@ -1144,8 +1144,8 @@ void KinematicBody2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin"); } -KinematicBody2D::KinematicBody2D() - : PhysicsBody2D(Physics2DServer::BODY_MODE_KINEMATIC) { +KinematicBody2D::KinematicBody2D() : + PhysicsBody2D(Physics2DServer::BODY_MODE_KINEMATIC) { margin = 0.08; diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h index 8eecf48df2..edc9de0543 100644 --- a/scene/2d/tile_map.h +++ b/scene/2d/tile_map.h @@ -147,8 +147,8 @@ private: navpoly_ids = q.navpoly_ids; occluder_instances = q.occluder_instances; } - Quadrant(const Quadrant &q) - : dirty_list(this) { + Quadrant(const Quadrant &q) : + dirty_list(this) { pos = q.pos; canvas_items = q.canvas_items; body = q.body; @@ -156,8 +156,8 @@ private: occluder_instances = q.occluder_instances; navpoly_ids = q.navpoly_ids; } - Quadrant() - : dirty_list(this) {} + Quadrant() : + dirty_list(this) {} }; Map<PosKey, Quadrant> quadrant_map; diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp index 266bc5e381..422aa556f9 100644 --- a/scene/3d/area.cpp +++ b/scene/3d/area.cpp @@ -737,8 +737,8 @@ void Area::_bind_methods() { BIND_ENUM_CONSTANT(SPACE_OVERRIDE_REPLACE_COMBINE); } -Area::Area() - : CollisionObject(PhysicsServer::get_singleton()->area_create(), true) { +Area::Area() : + CollisionObject(PhysicsServer::get_singleton()->area_create(), true) { space_override = SPACE_OVERRIDE_DISABLED; set_gravity(9.8); diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 2754d56a05..8e2f87738a 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -410,7 +410,7 @@ static bool planeBoxOverlap(Vector3 normal, float d, Vector3 maxbox) { rad = fa * boxhalfsize.x + fb * boxhalfsize.z; \ if (min > rad || max < -rad) return false; -/*======================== Z-tests ========================*/ + /*======================== Z-tests ========================*/ #define AXISTEST_Z12(a, b, fa, fb) \ p1 = a * v1.x - b * v1.y; \ diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp index 126c07f0be..1fc4e932e8 100644 --- a/scene/3d/light.cpp +++ b/scene/3d/light.cpp @@ -367,8 +367,8 @@ void DirectionalLight::_bind_methods() { BIND_ENUM_CONSTANT(SHADOW_DEPTH_RANGE_OPTIMIZED); } -DirectionalLight::DirectionalLight() - : Light(VisualServer::LIGHT_DIRECTIONAL) { +DirectionalLight::DirectionalLight() : + Light(VisualServer::LIGHT_DIRECTIONAL) { set_param(PARAM_SHADOW_NORMAL_BIAS, 0.8); set_param(PARAM_SHADOW_BIAS, 0.1); @@ -422,8 +422,8 @@ void OmniLight::_bind_methods() { BIND_ENUM_CONSTANT(SHADOW_DETAIL_HORIZONTAL); } -OmniLight::OmniLight() - : Light(VisualServer::LIGHT_OMNI) { +OmniLight::OmniLight() : + Light(VisualServer::LIGHT_OMNI) { set_shadow_mode(SHADOW_CUBE); set_shadow_detail(SHADOW_DETAIL_HORIZONTAL); diff --git a/scene/3d/light.h b/scene/3d/light.h index 8514b429ec..33e62214b1 100644 --- a/scene/3d/light.h +++ b/scene/3d/light.h @@ -208,8 +208,8 @@ protected: static void _bind_methods(); public: - SpotLight() - : Light(VisualServer::LIGHT_SPOT) {} + SpotLight() : + Light(VisualServer::LIGHT_SPOT) {} }; #endif diff --git a/scene/3d/navigation.h b/scene/3d/navigation.h index 010d16dedd..d9a38f7b00 100644 --- a/scene/3d/navigation.h +++ b/scene/3d/navigation.h @@ -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); }; - EdgeKey(const Point &p_a = Point(), const Point &p_b = Point()) - : a(p_a), - b(p_b) { + EdgeKey(const Point &p_a = Point(), const Point &p_b = Point()) : + a(p_a), + b(p_b) { if (a.key > b.key) { SWAP(a, b); } diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp index f8685a7b7c..ea8e617adc 100644 --- a/scene/3d/particles.cpp +++ b/scene/3d/particles.cpp @@ -1523,8 +1523,8 @@ void ParticlesMaterial::_bind_methods() { BIND_ENUM_CONSTANT(EMISSION_SHAPE_DIRECTED_POINTS); } -ParticlesMaterial::ParticlesMaterial() - : element(this) { +ParticlesMaterial::ParticlesMaterial() : + element(this) { set_spread(45); set_flatness(0); diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp index 4e06b272e2..f2f00bb617 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -166,8 +166,8 @@ void PhysicsBody::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask"); } -PhysicsBody::PhysicsBody(PhysicsServer::BodyMode p_mode) - : CollisionObject(PhysicsServer::get_singleton()->body_create(p_mode), false) { +PhysicsBody::PhysicsBody(PhysicsServer::BodyMode p_mode) : + CollisionObject(PhysicsServer::get_singleton()->body_create(p_mode), false) { collision_layer = 1; collision_mask = 1; @@ -241,8 +241,8 @@ void StaticBody::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "constant_angular_velocity"), "set_constant_angular_velocity", "get_constant_angular_velocity"); } -StaticBody::StaticBody() - : PhysicsBody(PhysicsServer::BODY_MODE_STATIC) { +StaticBody::StaticBody() : + PhysicsBody(PhysicsServer::BODY_MODE_STATIC) { bounce = 0; friction = 1; @@ -881,8 +881,8 @@ void RigidBody::_bind_methods() { BIND_ENUM_CONSTANT(AXIS_LOCK_Z); } -RigidBody::RigidBody() - : PhysicsBody(PhysicsServer::BODY_MODE_RIGID) { +RigidBody::RigidBody() : + PhysicsBody(PhysicsServer::BODY_MODE_RIGID) { mode = MODE_RIGID; @@ -1104,8 +1104,8 @@ void KinematicBody::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision/safe_margin", PROPERTY_HINT_RANGE, "0.001,256,0.001"), "set_safe_margin", "get_safe_margin"); } -KinematicBody::KinematicBody() - : PhysicsBody(PhysicsServer::BODY_MODE_KINEMATIC) { +KinematicBody::KinematicBody() : + PhysicsBody(PhysicsServer::BODY_MODE_KINEMATIC) { margin = 0.001; diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index 588aa2881a..d9f88ac693 100644 --- a/scene/3d/spatial.cpp +++ b/scene/3d/spatial.cpp @@ -756,8 +756,8 @@ void Spatial::_bind_methods() { ADD_SIGNAL(MethodInfo("visibility_changed")); } -Spatial::Spatial() - : xform_change(this) { +Spatial::Spatial() : + xform_change(this) { data.dirty = DIRTY_NONE; data.children_lock = 0; diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp index a072572142..2e3e179a7b 100644 --- a/scene/3d/vehicle_body.cpp +++ b/scene/3d/vehicle_body.cpp @@ -54,8 +54,8 @@ public: const Vector3 &inertiaInvA, const real_t massInvA, const Vector3 &inertiaInvB, - const real_t massInvB) - : m_linearJointAxis(jointAxis) { + const real_t massInvB) : + m_linearJointAxis(jointAxis) { m_aJ = world2A.xform(rel_pos1.cross(m_linearJointAxis)); m_bJ = world2B.xform(rel_pos2.cross(-m_linearJointAxis)); m_0MinvJt = inertiaInvA * m_aJ; @@ -593,12 +593,12 @@ void VehicleBody::_resolve_single_bilateral(PhysicsDirectBodyState *s, const Vec #endif } -VehicleBody::btVehicleWheelContactPoint::btVehicleWheelContactPoint(PhysicsDirectBodyState *s, PhysicsBody *body1, const Vector3 &frictionPosWorld, const Vector3 &frictionDirectionWorld, real_t maxImpulse) - : m_s(s), - m_body1(body1), - m_frictionPositionWorld(frictionPosWorld), - m_frictionDirectionWorld(frictionDirectionWorld), - m_maxImpulse(maxImpulse) { +VehicleBody::btVehicleWheelContactPoint::btVehicleWheelContactPoint(PhysicsDirectBodyState *s, PhysicsBody *body1, const Vector3 &frictionPosWorld, const Vector3 &frictionDirectionWorld, real_t maxImpulse) : + m_s(s), + m_body1(body1), + m_frictionPositionWorld(frictionPosWorld), + m_frictionDirectionWorld(frictionDirectionWorld), + m_maxImpulse(maxImpulse) { float denom0 = 0; float denom1 = 0; @@ -969,8 +969,8 @@ void VehicleBody::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "friction", PROPERTY_HINT_RANGE, "0.01,1,0.01"), "set_friction", "get_friction"); } -VehicleBody::VehicleBody() - : PhysicsBody(PhysicsServer::BODY_MODE_RIGID) { +VehicleBody::VehicleBody() : + PhysicsBody(PhysicsServer::BODY_MODE_RIGID) { m_pitchControl = 0; m_currentVehicleSpeedKmHour = real_t(0.); diff --git a/scene/animation/tween_interpolaters.cpp b/scene/animation/tween_interpolaters.cpp index 8f543a575a..cbf941f3ed 100644 --- a/scene/animation/tween_interpolaters.cpp +++ b/scene/animation/tween_interpolaters.cpp @@ -50,7 +50,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) { static real_t out_in(real_t t, real_t b, real_t c, real_t d) { return c * t / d + b; } -}; +}; // namespace linear /////////////////////////////////////////////////////////////////////////// // sine /////////////////////////////////////////////////////////////////////////// @@ -70,7 +70,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) { static real_t out_in(real_t t, real_t b, real_t c, real_t d) { return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d); } -}; +}; // namespace sine /////////////////////////////////////////////////////////////////////////// // quint /////////////////////////////////////////////////////////////////////////// @@ -92,7 +92,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) { static real_t out_in(real_t t, real_t b, real_t c, real_t d) { return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d); } -}; +}; // namespace quint /////////////////////////////////////////////////////////////////////////// // quart /////////////////////////////////////////////////////////////////////////// @@ -114,7 +114,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) { static real_t out_in(real_t t, real_t b, real_t c, real_t d) { return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d); } -}; +}; // namespace quart /////////////////////////////////////////////////////////////////////////// // quad /////////////////////////////////////////////////////////////////////////// @@ -137,7 +137,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) { static real_t out_in(real_t t, real_t b, real_t c, real_t d) { return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d); } -}; +}; // namespace quad /////////////////////////////////////////////////////////////////////////// // expo /////////////////////////////////////////////////////////////////////////// @@ -163,7 +163,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) { static real_t out_in(real_t t, real_t b, real_t c, real_t d) { return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d); } -}; +}; // namespace expo /////////////////////////////////////////////////////////////////////////// // elastic /////////////////////////////////////////////////////////////////////////// @@ -205,7 +205,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) { static real_t out_in(real_t t, real_t b, real_t c, real_t d) { return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d); } -}; +}; // namespace elastic /////////////////////////////////////////////////////////////////////////// // cubic /////////////////////////////////////////////////////////////////////////// @@ -227,7 +227,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) { static real_t out_in(real_t t, real_t b, real_t c, real_t d) { return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d); } -}; +}; // namespace cubic /////////////////////////////////////////////////////////////////////////// // circ /////////////////////////////////////////////////////////////////////////// @@ -248,7 +248,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) { static real_t out_in(real_t t, real_t b, real_t c, real_t d) { return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d); } -}; +}; // namespace circ /////////////////////////////////////////////////////////////////////////// // bounce /////////////////////////////////////////////////////////////////////////// @@ -281,7 +281,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) { static real_t out_in(real_t t, real_t b, real_t c, real_t d) { return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d); } -}; +}; // namespace bounce /////////////////////////////////////////////////////////////////////////// // back /////////////////////////////////////////////////////////////////////////// @@ -307,7 +307,7 @@ static real_t in_out(real_t t, real_t b, real_t c, real_t d) { static real_t out_in(real_t t, real_t b, real_t c, real_t d) { return (t < d / 2) ? out(t * 2, b, c / 2, d) : in((t * 2) - d, b + c / 2, c / 2, d); } -}; +}; // namespace back Tween::interpolater Tween::interpolaters[Tween::TRANS_COUNT][Tween::EASE_COUNT] = { { &linear::in, &linear::out, &linear::in_out, &linear::out_in }, diff --git a/scene/gui/box_container.h b/scene/gui/box_container.h index 4d00a2011f..ebbbbed1f9 100644 --- a/scene/gui/box_container.h +++ b/scene/gui/box_container.h @@ -70,8 +70,8 @@ class HBoxContainer : public BoxContainer { GDCLASS(HBoxContainer, BoxContainer); public: - HBoxContainer() - : BoxContainer(false) {} + HBoxContainer() : + BoxContainer(false) {} }; class MarginContainer; @@ -82,8 +82,8 @@ class VBoxContainer : public BoxContainer { public: MarginContainer *add_margin_child(const String &p_label, Control *p_control, bool p_expand = false); - VBoxContainer() - : BoxContainer(true) {} + VBoxContainer() : + BoxContainer(true) {} }; VARIANT_ENUM_CAST(BoxContainer::AlignMode); diff --git a/scene/gui/check_box.cpp b/scene/gui/check_box.cpp index e2b10a948f..00f6153062 100644 --- a/scene/gui/check_box.cpp +++ b/scene/gui/check_box.cpp @@ -56,8 +56,8 @@ bool CheckBox::is_radio() { return get_button_group().is_valid(); } -CheckBox::CheckBox(const String &p_text) - : Button(p_text) { +CheckBox::CheckBox(const String &p_text) : + Button(p_text) { set_toggle_mode(true); set_text_align(ALIGN_LEFT); } diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 7a0593bc87..cb6283507e 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -486,8 +486,8 @@ void ColorPicker::_bind_methods() { ADD_SIGNAL(MethodInfo("color_changed", PropertyInfo(Variant::COLOR, "color"))); } -ColorPicker::ColorPicker() - : BoxContainer(true) { +ColorPicker::ColorPicker() : + BoxContainer(true) { updating = true; edit_alpha = true; diff --git a/scene/gui/scroll_bar.h b/scene/gui/scroll_bar.h index 373483a8a0..753bd35de7 100644 --- a/scene/gui/scroll_bar.h +++ b/scene/gui/scroll_bar.h @@ -117,8 +117,8 @@ class HScrollBar : public ScrollBar { GDCLASS(HScrollBar, ScrollBar); public: - HScrollBar() - : ScrollBar(HORIZONTAL) { set_v_size_flags(0); } + HScrollBar() : + ScrollBar(HORIZONTAL) { set_v_size_flags(0); } }; class VScrollBar : public ScrollBar { @@ -126,8 +126,8 @@ class VScrollBar : public ScrollBar { GDCLASS(VScrollBar, ScrollBar); public: - VScrollBar() - : ScrollBar(VERTICAL) { set_h_size_flags(0); } + VScrollBar() : + ScrollBar(VERTICAL) { set_h_size_flags(0); } }; #endif diff --git a/scene/gui/slider.h b/scene/gui/slider.h index a2334a69fc..95ae429d63 100644 --- a/scene/gui/slider.h +++ b/scene/gui/slider.h @@ -77,8 +77,8 @@ class HSlider : public Slider { GDCLASS(HSlider, Slider); public: - HSlider() - : Slider(HORIZONTAL) { set_v_size_flags(0); } + HSlider() : + Slider(HORIZONTAL) { set_v_size_flags(0); } }; class VSlider : public Slider { @@ -86,8 +86,8 @@ class VSlider : public Slider { GDCLASS(VSlider, Slider); public: - VSlider() - : Slider(VERTICAL) { set_h_size_flags(0); } + VSlider() : + Slider(VERTICAL) { set_h_size_flags(0); } }; #endif // SLIDER_H diff --git a/scene/gui/split_container.h b/scene/gui/split_container.h index 8ec21b5eaa..c7a484c4c5 100644 --- a/scene/gui/split_container.h +++ b/scene/gui/split_container.h @@ -87,8 +87,8 @@ class HSplitContainer : public SplitContainer { GDCLASS(HSplitContainer, SplitContainer); public: - HSplitContainer() - : SplitContainer(false) { set_default_cursor_shape(CURSOR_HSPLIT); } + HSplitContainer() : + SplitContainer(false) { set_default_cursor_shape(CURSOR_HSPLIT); } }; class VSplitContainer : public SplitContainer { @@ -96,8 +96,8 @@ class VSplitContainer : public SplitContainer { GDCLASS(VSplitContainer, SplitContainer); public: - VSplitContainer() - : SplitContainer(true) { set_default_cursor_shape(CURSOR_VSPLIT); } + VSplitContainer() : + SplitContainer(true) { set_default_cursor_shape(CURSOR_VSPLIT); } }; #endif // SPLIT_CONTAINER_H diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 5ee286c2d5..deb40800bc 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -794,6 +794,7 @@ Ref<ArrayMesh> SceneTree::get_debug_contact_mesh() { Vector3(0, 0, 1) }; + /* clang-format off */ int diamond_faces[8 * 3] = { 0, 2, 4, 0, 3, 4, @@ -804,6 +805,7 @@ Ref<ArrayMesh> SceneTree::get_debug_contact_mesh() { 1, 2, 5, 1, 3, 5, }; + /* clang-format on */ PoolVector<int> indices; for (int i = 0; i < 8 * 3; i++) diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h index 7898dc065a..244fc8da62 100644 --- a/scene/main/scene_tree.h +++ b/scene/main/scene_tree.h @@ -420,8 +420,8 @@ public: void set_screen_stretch(StretchMode p_mode, StretchAspect p_aspect, const Size2 p_minsize, real_t p_shrink = 1); -//void change_scene(const String& p_path); -//Node *get_loaded_scene(); + //void change_scene(const String& p_path); + //Node *get_loaded_scene(); #ifdef TOOLS_ENABLED void set_edited_scene_root(Node *p_node); diff --git a/scene/resources/box_shape.cpp b/scene/resources/box_shape.cpp index 4b9843f3f5..858e19c9a6 100644 --- a/scene/resources/box_shape.cpp +++ b/scene/resources/box_shape.cpp @@ -73,8 +73,8 @@ void BoxShape::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "extents"), "set_extents", "get_extents"); } -BoxShape::BoxShape() - : Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_BOX)) { +BoxShape::BoxShape() : + Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_BOX)) { set_extents(Vector3(1, 1, 1)); } diff --git a/scene/resources/capsule_shape.cpp b/scene/resources/capsule_shape.cpp index e11b98f82e..f0eb8232e5 100644 --- a/scene/resources/capsule_shape.cpp +++ b/scene/resources/capsule_shape.cpp @@ -113,8 +113,8 @@ void CapsuleShape::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_height", "get_height"); } -CapsuleShape::CapsuleShape() - : Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_CAPSULE)) { +CapsuleShape::CapsuleShape() : + Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_CAPSULE)) { radius = 1.0; height = 1.0; diff --git a/scene/resources/capsule_shape_2d.cpp b/scene/resources/capsule_shape_2d.cpp index 912150b939..3caf12feb8 100644 --- a/scene/resources/capsule_shape_2d.cpp +++ b/scene/resources/capsule_shape_2d.cpp @@ -97,8 +97,8 @@ void CapsuleShape2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "height"), "set_height", "get_height"); } -CapsuleShape2D::CapsuleShape2D() - : Shape2D(Physics2DServer::get_singleton()->capsule_shape_create()) { +CapsuleShape2D::CapsuleShape2D() : + Shape2D(Physics2DServer::get_singleton()->capsule_shape_create()) { radius = 10; height = 20; diff --git a/scene/resources/circle_shape_2d.cpp b/scene/resources/circle_shape_2d.cpp index 287bde4bfb..bff3ed4d67 100644 --- a/scene/resources/circle_shape_2d.cpp +++ b/scene/resources/circle_shape_2d.cpp @@ -76,8 +76,8 @@ void CircleShape2D::draw(const RID &p_to_rid, const Color &p_color) { VisualServer::get_singleton()->canvas_item_add_polygon(p_to_rid, points, col); } -CircleShape2D::CircleShape2D() - : Shape2D(Physics2DServer::get_singleton()->circle_shape_create()) { +CircleShape2D::CircleShape2D() : + Shape2D(Physics2DServer::get_singleton()->circle_shape_create()) { radius = 10; _update_shape(); diff --git a/scene/resources/concave_polygon_shape.cpp b/scene/resources/concave_polygon_shape.cpp index 6ae4fde85e..1c48f0c30b 100644 --- a/scene/resources/concave_polygon_shape.cpp +++ b/scene/resources/concave_polygon_shape.cpp @@ -106,8 +106,8 @@ void ConcavePolygonShape::_bind_methods() { ClassDB::bind_method(D_METHOD("get_faces"), &ConcavePolygonShape::get_faces); } -ConcavePolygonShape::ConcavePolygonShape() - : Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_CONCAVE_POLYGON)) { +ConcavePolygonShape::ConcavePolygonShape() : + Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_CONCAVE_POLYGON)) { //set_planes(Vector3(1,1,1)); } diff --git a/scene/resources/concave_polygon_shape_2d.cpp b/scene/resources/concave_polygon_shape_2d.cpp index bb91e33ec2..e90046fd28 100644 --- a/scene/resources/concave_polygon_shape_2d.cpp +++ b/scene/resources/concave_polygon_shape_2d.cpp @@ -84,6 +84,6 @@ void ConcavePolygonShape2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "segments"), "set_segments", "get_segments"); } -ConcavePolygonShape2D::ConcavePolygonShape2D() - : Shape2D(Physics2DServer::get_singleton()->concave_polygon_shape_create()) { +ConcavePolygonShape2D::ConcavePolygonShape2D() : + Shape2D(Physics2DServer::get_singleton()->concave_polygon_shape_create()) { } diff --git a/scene/resources/convex_polygon_shape.cpp b/scene/resources/convex_polygon_shape.cpp index bba52bd5ff..31c4ea55e9 100644 --- a/scene/resources/convex_polygon_shape.cpp +++ b/scene/resources/convex_polygon_shape.cpp @@ -81,8 +81,8 @@ void ConvexPolygonShape::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "points"), "set_points", "get_points"); } -ConvexPolygonShape::ConvexPolygonShape() - : Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_CONVEX_POLYGON)) { +ConvexPolygonShape::ConvexPolygonShape() : + Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_CONVEX_POLYGON)) { //set_points(Vector3(1,1,1)); } diff --git a/scene/resources/convex_polygon_shape_2d.cpp b/scene/resources/convex_polygon_shape_2d.cpp index a76b6a7cf4..9c25b6b467 100644 --- a/scene/resources/convex_polygon_shape_2d.cpp +++ b/scene/resources/convex_polygon_shape_2d.cpp @@ -86,8 +86,8 @@ Rect2 ConvexPolygonShape2D::get_rect() const { return rect; } -ConvexPolygonShape2D::ConvexPolygonShape2D() - : Shape2D(Physics2DServer::get_singleton()->convex_polygon_shape_create()) { +ConvexPolygonShape2D::ConvexPolygonShape2D() : + Shape2D(Physics2DServer::get_singleton()->convex_polygon_shape_create()) { int pcount = 3; for (int i = 0; i < pcount; i++) diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index a6f301af1e..c8ab7c2a04 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -2066,8 +2066,8 @@ void SpatialMaterial::_bind_methods() { BIND_ENUM_CONSTANT(EMISSION_OP_MULTIPLY); } -SpatialMaterial::SpatialMaterial() - : element(this) { +SpatialMaterial::SpatialMaterial() : + element(this) { //initialize to right values set_albedo(Color(1.0, 1.0, 1.0, 1.0)); diff --git a/scene/resources/plane_shape.cpp b/scene/resources/plane_shape.cpp index 2b1e890a5d..2eb2ceff24 100644 --- a/scene/resources/plane_shape.cpp +++ b/scene/resources/plane_shape.cpp @@ -86,8 +86,8 @@ void PlaneShape::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::PLANE, "plane"), "set_plane", "get_plane"); } -PlaneShape::PlaneShape() - : Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_PLANE)) { +PlaneShape::PlaneShape() : + Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_PLANE)) { set_plane(Plane(0, 1, 0, 0)); } diff --git a/scene/resources/ray_shape.cpp b/scene/resources/ray_shape.cpp index ccce7660c6..b03a81b6bd 100644 --- a/scene/resources/ray_shape.cpp +++ b/scene/resources/ray_shape.cpp @@ -66,8 +66,8 @@ void RayShape::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "length", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_length", "get_length"); } -RayShape::RayShape() - : Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_RAY)) { +RayShape::RayShape() : + Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_RAY)) { set_length(1.0); } diff --git a/scene/resources/rectangle_shape_2d.cpp b/scene/resources/rectangle_shape_2d.cpp index 69dbb76744..202024aa96 100644 --- a/scene/resources/rectangle_shape_2d.cpp +++ b/scene/resources/rectangle_shape_2d.cpp @@ -66,8 +66,8 @@ void RectangleShape2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "extents"), "set_extents", "get_extents"); } -RectangleShape2D::RectangleShape2D() - : Shape2D(Physics2DServer::get_singleton()->rectangle_shape_create()) { +RectangleShape2D::RectangleShape2D() : + Shape2D(Physics2DServer::get_singleton()->rectangle_shape_create()) { extents = Vector2(10, 10); _update_shape(); diff --git a/scene/resources/segment_shape_2d.cpp b/scene/resources/segment_shape_2d.cpp index 7c7ec0d112..e8ef448e23 100644 --- a/scene/resources/segment_shape_2d.cpp +++ b/scene/resources/segment_shape_2d.cpp @@ -86,8 +86,8 @@ void SegmentShape2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "b"), "set_b", "get_b"); } -SegmentShape2D::SegmentShape2D() - : Shape2D(Physics2DServer::get_singleton()->segment_shape_create()) { +SegmentShape2D::SegmentShape2D() : + Shape2D(Physics2DServer::get_singleton()->segment_shape_create()) { a = Vector2(); b = Vector2(0, 10); @@ -145,8 +145,8 @@ real_t RayShape2D::get_length() const { return length; } -RayShape2D::RayShape2D() - : Shape2D(Physics2DServer::get_singleton()->ray_shape_create()) { +RayShape2D::RayShape2D() : + Shape2D(Physics2DServer::get_singleton()->ray_shape_create()) { length = 20; _update_shape(); diff --git a/scene/resources/shape_line_2d.cpp b/scene/resources/shape_line_2d.cpp index d046ce876c..512ff3bc56 100644 --- a/scene/resources/shape_line_2d.cpp +++ b/scene/resources/shape_line_2d.cpp @@ -95,8 +95,8 @@ void LineShape2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "d"), "set_d", "get_d"); } -LineShape2D::LineShape2D() - : Shape2D(Physics2DServer::get_singleton()->line_shape_create()) { +LineShape2D::LineShape2D() : + Shape2D(Physics2DServer::get_singleton()->line_shape_create()) { normal = Vector2(0, -1); d = 0; diff --git a/scene/resources/sphere_shape.cpp b/scene/resources/sphere_shape.cpp index 00203c2b4b..042988dcd3 100644 --- a/scene/resources/sphere_shape.cpp +++ b/scene/resources/sphere_shape.cpp @@ -80,8 +80,8 @@ void SphereShape::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_radius", "get_radius"); } -SphereShape::SphereShape() - : Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_SPHERE)) { +SphereShape::SphereShape() : + Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_SPHERE)) { set_radius(1.0); } diff --git a/scene/resources/tile_set.h b/scene/resources/tile_set.h index 18b62c778d..4d2b02f54b 100644 --- a/scene/resources/tile_set.h +++ b/scene/resources/tile_set.h @@ -81,8 +81,9 @@ public: Map<Vector2, int> priority_map; // Default size to prevent invalid value - explicit AutotileData() - : size(64, 64), icon_coord(0, 0) { + explicit AutotileData() : + size(64, 64), + icon_coord(0, 0) { bitmask_mode = BITMASK_2X2; } }; @@ -106,8 +107,9 @@ private: AutotileData autotile_data; // Default modulate for back-compat - explicit TileData() - : modulate(1, 1, 1), is_autotile(false) {} + explicit TileData() : + modulate(1, 1, 1), + is_autotile(false) {} }; Map<int, TileData> tile_map; |