diff options
Diffstat (limited to 'core/os/thread.cpp')
-rw-r--r-- | core/os/thread.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/os/thread.cpp b/core/os/thread.cpp index 399efb19a4..70f960ed2a 100644 --- a/core/os/thread.cpp +++ b/core/os/thread.cpp @@ -38,8 +38,9 @@ Error (*Thread::set_name_func)(const String &) = nullptr; Thread::ID Thread::_main_thread_id = 0; Thread::ID Thread::get_caller_id() { - if (get_thread_id_func) + if (get_thread_id_func) { return get_thread_id_func(); + } return 0; } @@ -51,13 +52,15 @@ Thread *Thread::create(ThreadCreateCallback p_callback, void *p_user, const Sett } void Thread::wait_to_finish(Thread *p_thread) { - if (wait_to_finish_func) + if (wait_to_finish_func) { wait_to_finish_func(p_thread); + } } Error Thread::set_name(const String &p_name) { - if (set_name_func) + if (set_name_func) { return set_name_func(p_name); + } return ERR_UNAVAILABLE; }; |