mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Replace size() == 0 with is_empty().
This commit is contained in:
@@ -221,7 +221,7 @@ void WorkerThreadPool::_post_tasks(Task **p_tasks, uint32_t p_count, bool p_high
|
||||
// Fall back to processing on the calling thread if there are no worker threads.
|
||||
// Separated into its own variable to make it easier to extend this logic
|
||||
// in custom builds.
|
||||
bool process_on_calling_thread = threads.size() == 0;
|
||||
bool process_on_calling_thread = threads.is_empty();
|
||||
if (process_on_calling_thread) {
|
||||
p_lock.temp_unlock();
|
||||
for (uint32_t i = 0; i < p_count; i++) {
|
||||
@@ -789,7 +789,7 @@ void WorkerThreadPool::init(int p_thread_count, float p_low_priority_task_ratio)
|
||||
}
|
||||
|
||||
void WorkerThreadPool::exit_languages_threads() {
|
||||
if (threads.size() == 0) {
|
||||
if (threads.is_empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -809,7 +809,7 @@ void WorkerThreadPool::exit_languages_threads() {
|
||||
}
|
||||
|
||||
void WorkerThreadPool::finish() {
|
||||
if (threads.size() == 0) {
|
||||
if (threads.is_empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user