mirror of
https://github.com/godotengine/godot.git
synced 2025-10-31 21:51:22 +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:
parent
07bc4e2f96
commit
0ee0fa42e6
683 changed files with 22803 additions and 12225 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue