Style: clang-format: Disable AllowShortIfStatementsOnASingleLine

Part of #33027, also discussed in #29848.

Enforcing the use of brackets even on single line statements would be
preferred, but `clang-format` doesn't have this functionality yet.
This commit is contained in:
Rémi Verschelde 2020-05-10 12:56:01 +02:00
parent 03b13e0c69
commit e956e80c1f
130 changed files with 967 additions and 511 deletions

View file

@ -253,7 +253,8 @@
cmd->method = p_method; \
SEMIC_SEP_LIST(CMD_ASSIGN_PARAM, N); \
unlock(); \
if (sync) sync->post(); \
if (sync) \
sync->post(); \
}
#define CMD_RET_TYPE(N) CommandRet##N<T, M, COMMA_SEP_LIST(TYPE_ARG, N) COMMA(N) R>
@ -269,7 +270,8 @@
cmd->ret = r_ret; \
cmd->sync_sem = ss; \
unlock(); \
if (sync) sync->post(); \
if (sync) \
sync->post(); \
ss->sem.wait(); \
ss->in_use = false; \
}
@ -286,7 +288,8 @@
SEMIC_SEP_LIST(CMD_ASSIGN_PARAM, N); \
cmd->sync_sem = ss; \
unlock(); \
if (sync) sync->post(); \
if (sync) \
sync->post(); \
ss->sem.wait(); \
ss->in_use = false; \
}
@ -418,12 +421,14 @@ class CommandQueueMT {
}
bool flush_one(bool p_lock = true) {
if (p_lock) lock();
if (p_lock)
lock();
tryagain:
// tried to read an empty queue
if (read_ptr == write_ptr) {
if (p_lock) unlock();
if (p_lock)
unlock();
return false;
}
@ -442,15 +447,18 @@ class CommandQueueMT {
read_ptr += size;
if (p_lock) unlock();
if (p_lock)
unlock();
cmd->call();
if (p_lock) lock();
if (p_lock)
lock();
cmd->post();
cmd->~CommandBase();
*(uint32_t *)&command_mem[size_ptr] &= ~1;
if (p_lock) unlock();
if (p_lock)
unlock();
return true;
}