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/rectangle_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/rectangle_shape_2d.cpp')
-rw-r--r-- | scene/resources/rectangle_shape_2d.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/scene/resources/rectangle_shape_2d.cpp b/scene/resources/rectangle_shape_2d.cpp index 19e72a65b0..949fddf2e7 100644 --- a/scene/resources/rectangle_shape_2d.cpp +++ b/scene/resources/rectangle_shape_2d.cpp @@ -33,29 +33,24 @@ #include "servers/physics_server_2d.h" #include "servers/rendering_server.h" void RectangleShape2D::_update_shape() { - PhysicsServer2D::get_singleton()->shape_set_data(get_rid(), extents); emit_changed(); } void RectangleShape2D::set_extents(const Vector2 &p_extents) { - extents = p_extents; _update_shape(); } Vector2 RectangleShape2D::get_extents() const { - return extents; } void RectangleShape2D::draw(const RID &p_to_rid, const Color &p_color) { - RenderingServer::get_singleton()->canvas_item_add_rect(p_to_rid, Rect2(-extents, extents * 2.0), p_color); } Rect2 RectangleShape2D::get_rect() const { - return Rect2(-extents, extents * 2.0); } @@ -64,7 +59,6 @@ real_t RectangleShape2D::get_enclosing_radius() const { } void RectangleShape2D::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_extents", "extents"), &RectangleShape2D::set_extents); ClassDB::bind_method(D_METHOD("get_extents"), &RectangleShape2D::get_extents); @@ -73,7 +67,6 @@ void RectangleShape2D::_bind_methods() { RectangleShape2D::RectangleShape2D() : Shape2D(PhysicsServer2D::get_singleton()->rectangle_shape_create()) { - extents = Vector2(10, 10); _update_shape(); } |