diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 13:23:58 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 16:54:55 +0200 |
commit | 0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch) | |
tree | a27e497da7104dd0a64f98a04fa3067668735e91 /scene/resources/shape_2d.cpp | |
parent | 710b34b70227becdc652b4ae027fe0ac47409642 (diff) | |
download | redot-engine-0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a.tar.gz |
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.
This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.
There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).
Part of #33027.
Diffstat (limited to 'scene/resources/shape_2d.cpp')
-rw-r--r-- | scene/resources/shape_2d.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/scene/resources/shape_2d.cpp b/scene/resources/shape_2d.cpp index 4fe585053a..b48de1aeb3 100644 --- a/scene/resources/shape_2d.cpp +++ b/scene/resources/shape_2d.cpp @@ -31,23 +31,19 @@ #include "shape_2d.h" #include "servers/physics_server_2d.h" RID Shape2D::get_rid() const { - return shape; } void Shape2D::set_custom_solver_bias(real_t p_bias) { - custom_bias = p_bias; PhysicsServer2D::get_singleton()->shape_set_custom_solver_bias(shape, custom_bias); } real_t Shape2D::get_custom_solver_bias() const { - return custom_bias; } bool Shape2D::collide_with_motion(const Transform2D &p_local_xform, const Vector2 &p_local_motion, const Ref<Shape2D> &p_shape, const Transform2D &p_shape_xform, const Vector2 &p_shape_motion) { - ERR_FAIL_COND_V(p_shape.is_null(), false); int r; return PhysicsServer2D::get_singleton()->shape_collide(get_rid(), p_local_xform, p_local_motion, p_shape->get_rid(), p_shape_xform, p_shape_motion, nullptr, 0, r); @@ -60,7 +56,6 @@ bool Shape2D::collide(const Transform2D &p_local_xform, const Ref<Shape2D> &p_sh } Array Shape2D::collide_with_motion_and_get_contacts(const Transform2D &p_local_xform, const Vector2 &p_local_motion, const Ref<Shape2D> &p_shape, const Transform2D &p_shape_xform, const Vector2 &p_shape_motion) { - ERR_FAIL_COND_V(p_shape.is_null(), Array()); const int max_contacts = 16; Vector2 result[max_contacts * 2]; @@ -78,7 +73,6 @@ Array Shape2D::collide_with_motion_and_get_contacts(const Transform2D &p_local_x return results; } Array Shape2D::collide_and_get_contacts(const Transform2D &p_local_xform, const Ref<Shape2D> &p_shape, const Transform2D &p_shape_xform) { - ERR_FAIL_COND_V(p_shape.is_null(), Array()); const int max_contacts = 16; Vector2 result[max_contacts * 2]; @@ -97,7 +91,6 @@ Array Shape2D::collide_and_get_contacts(const Transform2D &p_local_xform, const } void Shape2D::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_custom_solver_bias", "bias"), &Shape2D::set_custom_solver_bias); ClassDB::bind_method(D_METHOD("get_custom_solver_bias"), &Shape2D::get_custom_solver_bias); ClassDB::bind_method(D_METHOD("collide", "local_xform", "with_shape", "shape_xform"), &Shape2D::collide); @@ -114,6 +107,5 @@ Shape2D::Shape2D(const RID &p_rid) { } Shape2D::~Shape2D() { - PhysicsServer2D::get_singleton()->free(shape); } |