mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +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
|
|
@ -48,8 +48,9 @@
|
|||
#include "scene/scene_string_names.h"
|
||||
|
||||
void AnimationTreeEditor::edit(AnimationTree *p_tree) {
|
||||
if (tree == p_tree)
|
||||
if (tree == p_tree) {
|
||||
return;
|
||||
}
|
||||
|
||||
tree = p_tree;
|
||||
|
||||
|
|
@ -204,13 +205,15 @@ Vector<String> AnimationTreeEditor::get_animation_list() {
|
|||
}
|
||||
|
||||
AnimationTree *tree = singleton->tree;
|
||||
if (!tree || !tree->has_node(tree->get_animation_player()))
|
||||
if (!tree || !tree->has_node(tree->get_animation_player())) {
|
||||
return Vector<String>();
|
||||
}
|
||||
|
||||
AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(tree->get_node(tree->get_animation_player()));
|
||||
|
||||
if (!ap)
|
||||
if (!ap) {
|
||||
return Vector<String>();
|
||||
}
|
||||
|
||||
List<StringName> anims;
|
||||
ap->get_animation_list(&anims);
|
||||
|
|
@ -261,8 +264,9 @@ void AnimationTreeEditorPlugin::make_visible(bool p_visible) {
|
|||
editor->make_bottom_panel_item_visible(anim_tree_editor);
|
||||
anim_tree_editor->set_process(true);
|
||||
} else {
|
||||
if (anim_tree_editor->is_visible_in_tree())
|
||||
if (anim_tree_editor->is_visible_in_tree()) {
|
||||
editor->hide_bottom_panel();
|
||||
}
|
||||
button->hide();
|
||||
anim_tree_editor->set_process(false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue