You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +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:
@@ -128,8 +128,9 @@ void GDNativeLibraryEditor::_on_item_button(Object *item, int column, int id) {
|
||||
|
||||
if (id == BUTTON_SELECT_LIBRARY || id == BUTTON_SELECT_DEPENDENCES) {
|
||||
EditorFileDialog::FileMode mode = EditorFileDialog::FILE_MODE_OPEN_FILE;
|
||||
if (id == BUTTON_SELECT_DEPENDENCES)
|
||||
if (id == BUTTON_SELECT_DEPENDENCES) {
|
||||
mode = EditorFileDialog::FILE_MODE_OPEN_FILES;
|
||||
}
|
||||
|
||||
file_dialog->set_meta("target", target);
|
||||
file_dialog->set_meta("section", section);
|
||||
@@ -192,10 +193,11 @@ void GDNativeLibraryEditor::_on_create_new_entry() {
|
||||
}
|
||||
|
||||
void GDNativeLibraryEditor::_set_target_value(const String §ion, const String &target, Variant file) {
|
||||
if (section == "entry")
|
||||
if (section == "entry") {
|
||||
entry_configs[target].library = file;
|
||||
else if (section == "dependencies")
|
||||
} else if (section == "dependencies") {
|
||||
entry_configs[target].dependencies = file;
|
||||
}
|
||||
_translate_to_config_file();
|
||||
_update_tree();
|
||||
}
|
||||
@@ -237,8 +239,9 @@ void GDNativeLibraryEditor::_translate_to_config_file() {
|
||||
for (Map<String, NativePlatformConfig>::Element *E = platforms.front(); E; E = E->next()) {
|
||||
for (List<String>::Element *it = E->value().entries.front(); it; it = it->next()) {
|
||||
String target = E->key() + "." + it->get();
|
||||
if (entry_configs[target].library.empty() && entry_configs[target].dependencies.empty())
|
||||
if (entry_configs[target].library.empty() && entry_configs[target].dependencies.empty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
config->set_value("entry", target, entry_configs[target].library);
|
||||
config->set_value("dependencies", target, entry_configs[target].dependencies);
|
||||
@@ -371,8 +374,9 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() {
|
||||
|
||||
void GDNativeLibraryEditorPlugin::edit(Object *p_node) {
|
||||
Ref<GDNativeLibrary> new_library = Object::cast_to<GDNativeLibrary>(p_node);
|
||||
if (new_library.is_valid())
|
||||
if (new_library.is_valid()) {
|
||||
library_editor->edit(new_library);
|
||||
}
|
||||
}
|
||||
|
||||
bool GDNativeLibraryEditorPlugin::handles(Object *p_node) const {
|
||||
@@ -385,8 +389,9 @@ void GDNativeLibraryEditorPlugin::make_visible(bool p_visible) {
|
||||
EditorNode::get_singleton()->make_bottom_panel_item_visible(library_editor);
|
||||
|
||||
} else {
|
||||
if (library_editor->is_visible_in_tree())
|
||||
if (library_editor->is_visible_in_tree()) {
|
||||
EditorNode::get_singleton()->hide_bottom_panel();
|
||||
}
|
||||
button->hide();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user