From d06a8320e5d5117f8a057da16d33443f410a5d9f Mon Sep 17 00:00:00 2001 From: kobewi Date: Tue, 18 Oct 2022 18:47:44 +0200 Subject: Simplify GDVIRTUAL_CALL calls --- core/os/main_loop.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'core/os') diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp index a96e1989f9..c0504a174c 100644 --- a/core/os/main_loop.cpp +++ b/core/os/main_loop.cpp @@ -65,21 +65,15 @@ void MainLoop::initialize() { } bool MainLoop::physics_process(double p_time) { - bool quit; - if (GDVIRTUAL_CALL(_physics_process, p_time, quit)) { - return quit; - } - - return false; + bool quit = false; + GDVIRTUAL_CALL(_physics_process, p_time, quit); + return quit; } bool MainLoop::process(double p_time) { - bool quit; - if (GDVIRTUAL_CALL(_process, p_time, quit)) { - return quit; - } - - return false; + bool quit = false; + GDVIRTUAL_CALL(_process, p_time, quit); + return quit; } void MainLoop::finalize() { -- cgit v1.2.3