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:
@ -76,12 +76,14 @@ void EditorAssetInstaller::_uncheck_parent(TreeItem *p_item) {
|
||||
}
|
||||
|
||||
void EditorAssetInstaller::_item_edited() {
|
||||
if (updating)
|
||||
if (updating) {
|
||||
return;
|
||||
}
|
||||
|
||||
TreeItem *item = tree->get_edited();
|
||||
if (!item)
|
||||
if (!item) {
|
||||
return;
|
||||
}
|
||||
|
||||
String path = item->get_metadata(0);
|
||||
|
||||
@ -168,8 +170,9 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
|
||||
depth--;
|
||||
}
|
||||
|
||||
if (skip || path == String())
|
||||
if (skip || path == String()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
bool isdir = false;
|
||||
|
||||
@ -308,11 +311,13 @@ void EditorAssetInstaller::ok_pressed() {
|
||||
}
|
||||
msg += failed_files[i];
|
||||
}
|
||||
if (EditorNode::get_singleton() != nullptr)
|
||||
if (EditorNode::get_singleton() != nullptr) {
|
||||
EditorNode::get_singleton()->show_warning(msg);
|
||||
}
|
||||
} else {
|
||||
if (EditorNode::get_singleton() != nullptr)
|
||||
if (EditorNode::get_singleton() != nullptr) {
|
||||
EditorNode::get_singleton()->show_warning(TTR("Package installed successfully!"), TTR("Success!"));
|
||||
}
|
||||
}
|
||||
EditorFileSystem::get_singleton()->scan_changes();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user