summaryrefslogtreecommitdiffstats
path: root/tests/display_server_mock.h
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2023-07-11 16:18:10 +0200
committerkobewi <kobewi4e@gmail.com>2023-10-05 11:35:29 +0200
commit09b30be86dd3034b46ae26c1ecde1f9ad941a5c8 (patch)
tree286927a2063b42d350257896e308dfc1ed6fb03a /tests/display_server_mock.h
parentc7ed5d795ef396650e1e2853cf0d76cbdb1cb45e (diff)
downloadredot-engine-09b30be86dd3034b46ae26c1ecde1f9ad941a5c8.tar.gz
Add vararg call() method to C++ Callable
Diffstat (limited to 'tests/display_server_mock.h')
-rw-r--r--tests/display_server_mock.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/tests/display_server_mock.h b/tests/display_server_mock.h
index fe36fa0b69..8d8a678e20 100644
--- a/tests/display_server_mock.h
+++ b/tests/display_server_mock.h
@@ -64,13 +64,8 @@ private:
}
void _dispatch_input_event(const Ref<InputEvent> &p_event) {
- Variant ev = p_event;
- Variant *evp = &ev;
- Variant ret;
- Callable::CallError ce;
-
if (input_event_callback.is_valid()) {
- input_event_callback.callp((const Variant **)&evp, 1, ret, ce);
+ input_event_callback.call(p_event);
}
}
@@ -93,10 +88,7 @@ private:
void _send_window_event(WindowEvent p_event) {
if (!event_callback.is_null()) {
Variant event = int(p_event);
- Variant *eventp = &event;
- Variant ret;
- Callable::CallError ce;
- event_callback.callp((const Variant **)&eventp, 1, ret, ce);
+ event_callback.call(event);
}
}