You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
This commit is contained in:
@@ -34,8 +34,9 @@
|
||||
|
||||
void NinePatchRect::_notification(int p_what) {
|
||||
if (p_what == NOTIFICATION_DRAW) {
|
||||
if (texture.is_null())
|
||||
if (texture.is_null()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Rect2 rect = Rect2(Point2(), get_size());
|
||||
Rect2 src_rect = region_rect;
|
||||
@@ -86,8 +87,9 @@ void NinePatchRect::_bind_methods() {
|
||||
}
|
||||
|
||||
void NinePatchRect::set_texture(const Ref<Texture2D> &p_tex) {
|
||||
if (texture == p_tex)
|
||||
if (texture == p_tex) {
|
||||
return;
|
||||
}
|
||||
texture = p_tex;
|
||||
update();
|
||||
/*
|
||||
@@ -130,8 +132,9 @@ int NinePatchRect::get_patch_margin(Margin p_margin) const {
|
||||
}
|
||||
|
||||
void NinePatchRect::set_region_rect(const Rect2 &p_region_rect) {
|
||||
if (region_rect == p_region_rect)
|
||||
if (region_rect == p_region_rect) {
|
||||
return;
|
||||
}
|
||||
|
||||
region_rect = p_region_rect;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user