mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +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:
@@ -52,7 +52,6 @@ Gradient::~Gradient() {
|
||||
}
|
||||
|
||||
void Gradient::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("add_point", "offset", "color"), &Gradient::add_point);
|
||||
ClassDB::bind_method(D_METHOD("remove_point", "offset"), &Gradient::remove_point);
|
||||
|
||||
@@ -118,7 +117,6 @@ Vector<Gradient::Point> &Gradient::get_points() {
|
||||
}
|
||||
|
||||
void Gradient::add_point(float p_offset, const Color &p_color) {
|
||||
|
||||
Point p;
|
||||
p.offset = p_offset;
|
||||
p.color = p_color;
|
||||
@@ -129,7 +127,6 @@ void Gradient::add_point(float p_offset, const Color &p_color) {
|
||||
}
|
||||
|
||||
void Gradient::remove_point(int p_index) {
|
||||
|
||||
ERR_FAIL_INDEX(p_index, points.size());
|
||||
ERR_FAIL_COND(points.size() <= 2);
|
||||
points.remove(p_index);
|
||||
@@ -143,7 +140,6 @@ void Gradient::set_points(Vector<Gradient::Point> &p_points) {
|
||||
}
|
||||
|
||||
void Gradient::set_offset(int pos, const float offset) {
|
||||
|
||||
ERR_FAIL_COND(pos < 0);
|
||||
if (points.size() <= pos)
|
||||
points.resize(pos + 1);
|
||||
|
||||
Reference in New Issue
Block a user