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:
@ -47,10 +47,11 @@ Error GDScriptLanguageProtocol::LSPeer::handle_data() {
|
||||
ERR_FAIL_COND_V_MSG(true, ERR_OUT_OF_MEMORY, "Response header too big");
|
||||
}
|
||||
Error err = connection->get_partial_data(&req_buf[req_pos], 1, read);
|
||||
if (err != OK)
|
||||
if (err != OK) {
|
||||
return FAILED;
|
||||
else if (read != 1) // Busy, wait until next poll
|
||||
} else if (read != 1) { // Busy, wait until next poll
|
||||
return ERR_BUSY;
|
||||
}
|
||||
char *r = (char *)req_buf;
|
||||
int l = req_pos;
|
||||
|
||||
@ -75,10 +76,11 @@ Error GDScriptLanguageProtocol::LSPeer::handle_data() {
|
||||
ERR_FAIL_COND_V_MSG(req_pos >= LSP_MAX_BUFFER_SIZE, ERR_OUT_OF_MEMORY, "Response content too big");
|
||||
}
|
||||
Error err = connection->get_partial_data(&req_buf[req_pos], 1, read);
|
||||
if (err != OK)
|
||||
if (err != OK) {
|
||||
return FAILED;
|
||||
else if (read != 1)
|
||||
} else if (read != 1) {
|
||||
return ERR_BUSY;
|
||||
}
|
||||
req_pos++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user