MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / call

Method call

compat/fake_script.h:157–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155
156 template <typename... VarArgs>
157 Variant call(const StringName &p_method, VarArgs... p_args) {
158 Variant args[sizeof...(p_args) + 1] = { p_args..., Variant() }; // +1 makes sure zero sized arrays are also supported.
159 const Variant *argptrs[sizeof...(p_args) + 1];
160 for (uint32_t i = 0; i < sizeof...(p_args); i++) {
161 argptrs[i] = &args[i];
162 }
163 Callable::CallError cerr;
164 return callp(p_method, sizeof...(p_args) == 0 ? nullptr : (const Variant **)argptrs, sizeof...(p_args), cerr);
165 }
166
167 virtual Variant call_const(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) override; // implement if language supports const functions
168 virtual void notification(int p_notification, bool p_reversed = false) override;

Callers 2

_notificationMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected