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
2020-05-14 16:41:43 +02:00
parent 07bc4e2f96
commit 0ee0fa42e6
683 changed files with 22803 additions and 12225 deletions
+8 -4
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;
}
@@ -252,8 +254,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 += ")";
@@ -323,8 +326,9 @@ MainLoop *test() {
while (true) {
CharType c = fa->get_8();
if (fa->eof_reached())
if (fa->eof_reached()) {
break;
}
code += c;
}