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:
@@ -70,8 +70,9 @@ MainLoop *test() {
|
||||
uint32_t num_elems = 0;
|
||||
for (int i = 0; i < 500; i++) {
|
||||
int tmp;
|
||||
if (map.lookup(i, tmp) && tmp == i * 2)
|
||||
if (map.lookup(i, tmp) && tmp == i * 2) {
|
||||
num_elems++;
|
||||
}
|
||||
}
|
||||
|
||||
OS::get_singleton()->print("elements %d == %d.\n", map.get_num_elements(), num_elems);
|
||||
@@ -104,8 +105,9 @@ MainLoop *test() {
|
||||
keys[i] = Math::rand();
|
||||
map.set(keys[i], dummy);
|
||||
|
||||
if (!map.lookup(keys[i], dummy))
|
||||
if (!map.lookup(keys[i], dummy)) {
|
||||
OS::get_singleton()->print("could not find 0x%X despite it was just inserted!\n", unsigned(keys[i]));
|
||||
}
|
||||
}
|
||||
|
||||
// check whether the keys are still present
|
||||
|
||||
Reference in New Issue
Block a user