summaryrefslogtreecommitdiff
path: root/core/os/main_loop.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-10-31 11:55:56 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-10-31 11:55:56 +0100
commitbe126d42d44bfc3ca4133ff6c3c12fcfe849f0c2 (patch)
treed7bcb97c48e7cef1a234ab13ad9eeb9e65afa50b /core/os/main_loop.cpp
parent33c7c8020a7c1b4103642ff5124b2b76ecdeea14 (diff)
parentd06a8320e5d5117f8a057da16d33443f410a5d9f (diff)
Merge pull request #67588 from KoBeWi/if(!GDVIRTUAL_CALL)don't
Simplify GDVIRTUAL_CALL calls
Diffstat (limited to 'core/os/main_loop.cpp')
-rw-r--r--core/os/main_loop.cpp18
1 files changed, 6 insertions, 12 deletions
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() {