mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03: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:
@@ -536,7 +536,6 @@ GroupDialog::GroupDialog() {
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void GroupsEditor::_add_group(const String &p_group) {
|
||||
|
||||
if (!node)
|
||||
return;
|
||||
|
||||
@@ -564,7 +563,6 @@ void GroupsEditor::_add_group(const String &p_group) {
|
||||
}
|
||||
|
||||
void GroupsEditor::_remove_group(Object *p_item, int p_column, int p_id) {
|
||||
|
||||
if (!node)
|
||||
return;
|
||||
|
||||
@@ -589,14 +587,12 @@ void GroupsEditor::_remove_group(Object *p_item, int p_column, int p_id) {
|
||||
}
|
||||
|
||||
struct _GroupInfoComparator {
|
||||
|
||||
bool operator()(const Node::GroupInfo &p_a, const Node::GroupInfo &p_b) const {
|
||||
return p_a.name.operator String() < p_b.name.operator String();
|
||||
}
|
||||
};
|
||||
|
||||
void GroupsEditor::update_tree() {
|
||||
|
||||
tree->clear();
|
||||
|
||||
if (!node)
|
||||
@@ -609,7 +605,6 @@ void GroupsEditor::update_tree() {
|
||||
TreeItem *root = tree->create_item();
|
||||
|
||||
for (List<GroupInfo>::Element *E = groups.front(); E; E = E->next()) {
|
||||
|
||||
Node::GroupInfo gi = E->get();
|
||||
if (!gi.persistent)
|
||||
continue;
|
||||
@@ -618,11 +613,9 @@ void GroupsEditor::update_tree() {
|
||||
bool can_be_deleted = true;
|
||||
|
||||
while (n) {
|
||||
|
||||
Ref<SceneState> ss = (n == EditorNode::get_singleton()->get_edited_scene()) ? n->get_scene_inherited_state() : n->get_scene_instance_state();
|
||||
|
||||
if (ss.is_valid()) {
|
||||
|
||||
int path = ss->find_node_by_path(n->get_path_to(node));
|
||||
if (path != -1) {
|
||||
if (ss->is_node_in_group(path, gi.name)) {
|
||||
@@ -645,13 +638,11 @@ void GroupsEditor::update_tree() {
|
||||
}
|
||||
|
||||
void GroupsEditor::set_current(Node *p_node) {
|
||||
|
||||
node = p_node;
|
||||
update_tree();
|
||||
}
|
||||
|
||||
void GroupsEditor::_show_group_dialog() {
|
||||
|
||||
group_dialog->edit();
|
||||
group_dialog->set_undo_redo(undo_redo);
|
||||
}
|
||||
@@ -661,7 +652,6 @@ void GroupsEditor::_bind_methods() {
|
||||
}
|
||||
|
||||
GroupsEditor::GroupsEditor() {
|
||||
|
||||
node = nullptr;
|
||||
|
||||
VBoxContainer *vbc = this;
|
||||
|
||||
Reference in New Issue
Block a user