1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Style: clang-format: Disable AllowShortIfStatementsOnASingleLine

This commit is contained in:
Rémi Verschelde
2021-05-04 14:28:27 +02:00
parent 6e600cb3f0
commit 3d15f04668
128 changed files with 872 additions and 455 deletions

View File

@@ -233,7 +233,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>
@@ -249,7 +250,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; \
}
@@ -266,7 +268,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; \
}
@@ -408,12 +411,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_and_epoch == write_ptr_and_epoch) {
if (p_lock) unlock();
if (p_lock)
unlock();
return false;
}
@@ -436,15 +441,18 @@ class CommandQueueMT {
read_ptr_and_epoch = (read_ptr << 1) | (read_ptr_and_epoch & 1);
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;
}