You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +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:
@@ -33,11 +33,13 @@
|
||||
#include "scene/animation/skeleton_ik.h"
|
||||
|
||||
void SkeletonIKEditorPlugin::_play() {
|
||||
if (!skeleton_ik)
|
||||
if (!skeleton_ik) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!skeleton_ik->get_parent_skeleton())
|
||||
if (!skeleton_ik->get_parent_skeleton()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (play_btn->is_pressed()) {
|
||||
skeleton_ik->start();
|
||||
@@ -56,8 +58,9 @@ void SkeletonIKEditorPlugin::edit(Object *p_object) {
|
||||
}
|
||||
|
||||
SkeletonIK *s = Object::cast_to<SkeletonIK>(p_object);
|
||||
if (!s)
|
||||
if (!s) {
|
||||
return;
|
||||
}
|
||||
|
||||
skeleton_ik = s;
|
||||
}
|
||||
@@ -67,10 +70,11 @@ bool SkeletonIKEditorPlugin::handles(Object *p_object) const {
|
||||
}
|
||||
|
||||
void SkeletonIKEditorPlugin::make_visible(bool p_visible) {
|
||||
if (p_visible)
|
||||
if (p_visible) {
|
||||
play_btn->show();
|
||||
else
|
||||
} else {
|
||||
play_btn->hide();
|
||||
}
|
||||
}
|
||||
|
||||
void SkeletonIKEditorPlugin::_bind_methods() {
|
||||
|
||||
Reference in New Issue
Block a user