diff options
author | Jan Haller <bromeon@gmail.com> | 2023-01-19 22:21:19 +0100 |
---|---|---|
committer | Jan Haller <bromeon@gmail.com> | 2023-01-19 22:21:19 +0100 |
commit | b8c4ae28b7e7554d8229ece0a694b08efbaa224c (patch) | |
tree | 686db319757018a2e4f1bacb7cf614a04d23d2fd /core/extension | |
parent | 88cbd5d42266b57e9ca8a0727640082fb303cef3 (diff) |
Fix use of `bool` in extension header
Diffstat (limited to 'core/extension')
-rw-r--r-- | core/extension/gdextension_interface.cpp | 8 | ||||
-rw-r--r-- | core/extension/gdextension_interface.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/core/extension/gdextension_interface.cpp b/core/extension/gdextension_interface.cpp index 4df3df160f..a9063c8b27 100644 --- a/core/extension/gdextension_interface.cpp +++ b/core/extension/gdextension_interface.cpp @@ -722,16 +722,16 @@ static uint64_t gdextension_file_access_get_buffer(GDExtensionConstObjectPtr p_i return fa->get_buffer(p_dst, p_length); } -static int64_t gdextension_worker_thread_pool_add_native_group_task(GDExtensionObjectPtr p_instance, void (*p_func)(void *, uint32_t), void *p_userdata, int p_elements, int p_tasks, bool p_high_priority, GDExtensionConstStringPtr p_description) { +static int64_t gdextension_worker_thread_pool_add_native_group_task(GDExtensionObjectPtr p_instance, void (*p_func)(void *, uint32_t), void *p_userdata, int p_elements, int p_tasks, GDExtensionBool p_high_priority, GDExtensionConstStringPtr p_description) { WorkerThreadPool *p = (WorkerThreadPool *)p_instance; const String *description = (const String *)p_description; - return (int64_t)p->add_native_group_task(p_func, p_userdata, p_elements, p_tasks, p_high_priority, *description); + return (int64_t)p->add_native_group_task(p_func, p_userdata, p_elements, p_tasks, static_cast<bool>(p_high_priority), *description); } -static int64_t gdextension_worker_thread_pool_add_native_task(GDExtensionObjectPtr p_instance, void (*p_func)(void *), void *p_userdata, bool p_high_priority, GDExtensionConstStringPtr p_description) { +static int64_t gdextension_worker_thread_pool_add_native_task(GDExtensionObjectPtr p_instance, void (*p_func)(void *), void *p_userdata, GDExtensionBool p_high_priority, GDExtensionConstStringPtr p_description) { WorkerThreadPool *p = (WorkerThreadPool *)p_instance; const String *description = (const String *)p_description; - return (int64_t)p->add_native_task(p_func, p_userdata, p_high_priority, *description); + return (int64_t)p->add_native_task(p_func, p_userdata, static_cast<bool>(p_high_priority), *description); } /* Packed array functions */ diff --git a/core/extension/gdextension_interface.h b/core/extension/gdextension_interface.h index a16eef2fcf..6e5dee8265 100644 --- a/core/extension/gdextension_interface.h +++ b/core/extension/gdextension_interface.h @@ -520,8 +520,8 @@ typedef struct { /* WorkerThreadPool extra utilities */ - int64_t (*worker_thread_pool_add_native_group_task)(GDExtensionObjectPtr p_instance, void (*p_func)(void *, uint32_t), void *p_userdata, int p_elements, int p_tasks, bool p_high_priority, GDExtensionConstStringPtr p_description); - int64_t (*worker_thread_pool_add_native_task)(GDExtensionObjectPtr p_instance, void (*p_func)(void *), void *p_userdata, bool p_high_priority, GDExtensionConstStringPtr p_description); + int64_t (*worker_thread_pool_add_native_group_task)(GDExtensionObjectPtr p_instance, void (*p_func)(void *, uint32_t), void *p_userdata, int p_elements, int p_tasks, GDExtensionBool p_high_priority, GDExtensionConstStringPtr p_description); + int64_t (*worker_thread_pool_add_native_task)(GDExtensionObjectPtr p_instance, void (*p_func)(void *), void *p_userdata, GDExtensionBool p_high_priority, GDExtensionConstStringPtr p_description); /* Packed array functions */ |