From 7046fa7b0854fe6efc60d173dd27652d992f10e2 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 24 May 2020 19:59:40 +0200 Subject: [PATCH] Invert the logic of the 2 control flow functions name. --- thread_pool_job.cpp | 8 ++++---- thread_pool_job.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/thread_pool_job.cpp b/thread_pool_job.cpp index c68ae01..5e68108 100644 --- a/thread_pool_job.cpp +++ b/thread_pool_job.cpp @@ -92,7 +92,7 @@ float ThreadPoolJob::get_current_execution_time() { return (OS::get_singleton()->get_system_time_msecs() - _start_time) / 1000.0; } -bool ThreadPoolJob::should_skip(const bool just_check) { +bool ThreadPoolJob::should_do(const bool just_check) { if (just_check) { return _current_run_stage < _stage; } @@ -107,7 +107,7 @@ bool ThreadPoolJob::should_skip(const bool just_check) { return false; } -bool ThreadPoolJob::should_continue() { +bool ThreadPoolJob::should_return() { if (_cancelled) return false; @@ -284,8 +284,8 @@ void ThreadPoolJob::_bind_methods() { ClassDB::bind_method(D_METHOD("get_current_execution_time"), &ThreadPoolJob::get_current_execution_time); - ClassDB::bind_method(D_METHOD("should_skip", "just_check"), &ThreadPoolJob::should_skip, DEFVAL(false)); - ClassDB::bind_method(D_METHOD("should_continue"), &ThreadPoolJob::should_continue); + ClassDB::bind_method(D_METHOD("should_do", "just_check"), &ThreadPoolJob::should_do, DEFVAL(false)); + ClassDB::bind_method(D_METHOD("should_return"), &ThreadPoolJob::should_return); ClassDB::bind_method(D_METHOD("execute"), &ThreadPoolJob::execute); diff --git a/thread_pool_job.h b/thread_pool_job.h index d2d8fc8..54ce456 100644 --- a/thread_pool_job.h +++ b/thread_pool_job.h @@ -60,8 +60,8 @@ public: float get_current_execution_time(); - bool should_skip(const bool just_check = false); - bool should_continue(); + bool should_do(const bool just_check = false); + bool should_return(); void execute(); void setup(const Variant &obj, const StringName &p_method, VARIANT_ARG_LIST);