You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +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,11 +31,8 @@
|
||||
#include "grid_container.h"
|
||||
|
||||
void GridContainer::_notification(int p_what) {
|
||||
|
||||
switch (p_what) {
|
||||
|
||||
case NOTIFICATION_SORT_CHILDREN: {
|
||||
|
||||
Map<int, int> col_minw; // Max of min_width of all controls in each col (indexed by col).
|
||||
Map<int, int> row_minh; // Max of min_height of all controls in each row (indexed by row).
|
||||
Set<int> col_expanded; // Columns which have the SIZE_EXPAND flag set.
|
||||
@@ -168,14 +165,12 @@ void GridContainer::_notification(int p_what) {
|
||||
|
||||
} break;
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
|
||||
minimum_size_changed();
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
void GridContainer::set_columns(int p_columns) {
|
||||
|
||||
ERR_FAIL_COND(p_columns < 1);
|
||||
columns = p_columns;
|
||||
queue_sort();
|
||||
@@ -183,12 +178,10 @@ void GridContainer::set_columns(int p_columns) {
|
||||
}
|
||||
|
||||
int GridContainer::get_columns() const {
|
||||
|
||||
return columns;
|
||||
}
|
||||
|
||||
void GridContainer::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_columns", "columns"), &GridContainer::set_columns);
|
||||
ClassDB::bind_method(D_METHOD("get_columns"), &GridContainer::get_columns);
|
||||
|
||||
@@ -196,7 +189,6 @@ void GridContainer::_bind_methods() {
|
||||
}
|
||||
|
||||
Size2 GridContainer::get_minimum_size() const {
|
||||
|
||||
Map<int, int> col_minw;
|
||||
Map<int, int> row_minh;
|
||||
|
||||
@@ -208,7 +200,6 @@ Size2 GridContainer::get_minimum_size() const {
|
||||
|
||||
int valid_controls_index = 0;
|
||||
for (int i = 0; i < get_child_count(); i++) {
|
||||
|
||||
Control *c = Object::cast_to<Control>(get_child(i));
|
||||
if (!c || !c->is_visible())
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user