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
2021-05-05 12:44:11 +02:00
parent b8d198eeed
commit 140350d767
694 changed files with 23283 additions and 12499 deletions

View File

@ -140,8 +140,9 @@ static String dump_node_code(SL::Node *p_node, int p_level) {
"white"
};
if (E->get().hint)
if (E->get().hint) {
ucode += " : " + String(hint_name[E->get().hint]);
}
code += ucode + "\n";
}
@ -160,8 +161,9 @@ static String dump_node_code(SL::Node *p_node, int p_level) {
String header;
header = _typestr(fnode->return_type) + " " + fnode->name + "(";
for (int j = 0; j < fnode->arguments.size(); j++) {
if (j > 0)
if (j > 0) {
header += ", ";
}
header += _prestr(fnode->arguments[j].precision) + _typestr(fnode->arguments[j].type) + " " + fnode->arguments[j].name;
}
@ -247,8 +249,9 @@ static String dump_node_code(SL::Node *p_node, int p_level) {
case SL::OP_CONSTRUCT:
code = dump_node_code(onode->arguments[0], p_level) + "(";
for (int i = 1; i < onode->arguments.size(); i++) {
if (i > 1)
if (i > 1) {
code += ", ";
}
code += dump_node_code(onode->arguments[i], p_level);
}
code += ")";
@ -318,8 +321,9 @@ MainLoop *test() {
while (true) {
CharType c = fa->get_8();
if (fa->eof_reached())
if (fa->eof_reached()) {
break;
}
code += c;
}