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:
Rémi Verschelde 2020-05-14 16:41:43 +02:00
parent 07bc4e2f96
commit 0ee0fa42e6
683 changed files with 22803 additions and 12225 deletions

View file

@ -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() {