You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +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/3d/skeleton_ik_3d.h"
|
||||
|
||||
void SkeletonIK3DEditorPlugin::_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 SkeletonIK3DEditorPlugin::edit(Object *p_object) {
|
||||
}
|
||||
|
||||
SkeletonIK3D *s = Object::cast_to<SkeletonIK3D>(p_object);
|
||||
if (!s)
|
||||
if (!s) {
|
||||
return;
|
||||
}
|
||||
|
||||
skeleton_ik = s;
|
||||
}
|
||||
@@ -67,10 +70,11 @@ bool SkeletonIK3DEditorPlugin::handles(Object *p_object) const {
|
||||
}
|
||||
|
||||
void SkeletonIK3DEditorPlugin::make_visible(bool p_visible) {
|
||||
if (p_visible)
|
||||
if (p_visible) {
|
||||
play_btn->show();
|
||||
else
|
||||
} else {
|
||||
play_btn->hide();
|
||||
}
|
||||
}
|
||||
|
||||
void SkeletonIK3DEditorPlugin::_bind_methods() {
|
||||
|
||||
Reference in New Issue
Block a user