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:
parent
710b34b702
commit
0be6d925dc
1552 changed files with 1 additions and 33876 deletions
|
|
@ -33,9 +33,7 @@
|
|||
#include "servers/rendering_server.h"
|
||||
|
||||
void TextureRect::_notification(int p_what) {
|
||||
|
||||
if (p_what == NOTIFICATION_DRAW) {
|
||||
|
||||
if (texture.is_null()) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -116,7 +114,6 @@ void TextureRect::_notification(int p_what) {
|
|||
}
|
||||
|
||||
Size2 TextureRect::get_minimum_size() const {
|
||||
|
||||
if (!expand && !texture.is_null()) {
|
||||
return texture->get_size();
|
||||
} else {
|
||||
|
|
@ -125,7 +122,6 @@ Size2 TextureRect::get_minimum_size() const {
|
|||
}
|
||||
|
||||
void TextureRect::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_texture", "texture"), &TextureRect::set_texture);
|
||||
ClassDB::bind_method(D_METHOD("get_texture"), &TextureRect::get_texture);
|
||||
ClassDB::bind_method(D_METHOD("set_expand", "enable"), &TextureRect::set_expand);
|
||||
|
|
@ -154,7 +150,6 @@ void TextureRect::_bind_methods() {
|
|||
}
|
||||
|
||||
void TextureRect::_texture_changed() {
|
||||
|
||||
if (texture.is_valid()) {
|
||||
update();
|
||||
minimum_size_changed();
|
||||
|
|
@ -162,7 +157,6 @@ void TextureRect::_texture_changed() {
|
|||
}
|
||||
|
||||
void TextureRect::set_texture(const Ref<Texture2D> &p_tex) {
|
||||
|
||||
if (p_tex == texture) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -182,57 +176,47 @@ void TextureRect::set_texture(const Ref<Texture2D> &p_tex) {
|
|||
}
|
||||
|
||||
Ref<Texture2D> TextureRect::get_texture() const {
|
||||
|
||||
return texture;
|
||||
}
|
||||
|
||||
void TextureRect::set_expand(bool p_expand) {
|
||||
|
||||
expand = p_expand;
|
||||
update();
|
||||
minimum_size_changed();
|
||||
}
|
||||
|
||||
bool TextureRect::has_expand() const {
|
||||
|
||||
return expand;
|
||||
}
|
||||
|
||||
void TextureRect::set_stretch_mode(StretchMode p_mode) {
|
||||
|
||||
stretch_mode = p_mode;
|
||||
update();
|
||||
}
|
||||
|
||||
TextureRect::StretchMode TextureRect::get_stretch_mode() const {
|
||||
|
||||
return stretch_mode;
|
||||
}
|
||||
|
||||
void TextureRect::set_flip_h(bool p_flip) {
|
||||
|
||||
hflip = p_flip;
|
||||
update();
|
||||
}
|
||||
|
||||
bool TextureRect::is_flipped_h() const {
|
||||
|
||||
return hflip;
|
||||
}
|
||||
|
||||
void TextureRect::set_flip_v(bool p_flip) {
|
||||
|
||||
vflip = p_flip;
|
||||
update();
|
||||
}
|
||||
|
||||
bool TextureRect::is_flipped_v() const {
|
||||
|
||||
return vflip;
|
||||
}
|
||||
|
||||
TextureRect::TextureRect() {
|
||||
|
||||
expand = false;
|
||||
hflip = false;
|
||||
vflip = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue