mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +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
|
@ -381,8 +381,9 @@ void RenameDialog::_update_preview_int(int new_value) {
|
|||
}
|
||||
|
||||
void RenameDialog::_update_preview(String new_text) {
|
||||
if (lock_preview_update || preview_node == nullptr)
|
||||
if (lock_preview_update || preview_node == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
has_errors = false;
|
||||
add_error_handler(&eh);
|
||||
|
@ -469,8 +470,9 @@ void RenameDialog::_error_handler(void *p_self, const char *p_func, const char *
|
|||
String source_file(p_file);
|
||||
|
||||
// Only show first error that is related to "regex"
|
||||
if (self->has_errors || source_file.find("regex") < 0)
|
||||
if (self->has_errors || source_file.find("regex") < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
String err_str;
|
||||
if (p_errorexp && p_errorexp[0]) {
|
||||
|
@ -538,8 +540,9 @@ String RenameDialog::_postprocess(const String &subject) {
|
|||
}
|
||||
|
||||
void RenameDialog::_iterate_scene(const Node *node, const Array &selection, int *counter) {
|
||||
if (!node)
|
||||
if (!node) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (selection.has(node)) {
|
||||
String new_name = _apply_rename(node, *counter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue