You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
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.
This commit is contained in:
@@ -31,32 +31,26 @@
|
||||
#include "line_2d_editor_plugin.h"
|
||||
|
||||
Node2D *Line2DEditor::_get_node() const {
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
void Line2DEditor::_set_node(Node *p_line) {
|
||||
|
||||
node = Object::cast_to<Line2D>(p_line);
|
||||
}
|
||||
|
||||
bool Line2DEditor::_is_line() const {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Variant Line2DEditor::_get_polygon(int p_idx) const {
|
||||
|
||||
return _get_node()->get("points");
|
||||
}
|
||||
|
||||
void Line2DEditor::_set_polygon(int p_idx, const Variant &p_polygon) const {
|
||||
|
||||
_get_node()->set("points", p_polygon);
|
||||
}
|
||||
|
||||
void Line2DEditor::_action_set_polygon(int p_idx, const Variant &p_previous, const Variant &p_polygon) {
|
||||
|
||||
Node2D *node = _get_node();
|
||||
undo_redo->add_do_method(node, "set_points", p_polygon);
|
||||
undo_redo->add_undo_method(node, "set_points", p_previous);
|
||||
|
||||
Reference in New Issue
Block a user