From 828e1c092fa706d4392363435950960261765ba4 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 7 Sep 2016 19:39:02 -0300 Subject: Renamed the bind_native functions to bind_vararg, should make it show the documentation more clearly and also make it easier to bind to C# --- core/object.cpp | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'core/object.cpp') diff --git a/core/object.cpp b/core/object.cpp index b036efa501..81fdc2a90c 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -1693,42 +1693,26 @@ void Object::_bind_methods() { MethodInfo mi; mi.name="emit_signal"; mi.arguments.push_back( PropertyInfo( Variant::STRING, "signal")); - Vector defargs; - for(int i=0;i defargs; - for(int i=0;i<10;i++) { - mi.arguments.push_back( PropertyInfo( Variant::NIL, "arg"+itos(i))); - defargs.push_back(Variant()); - } - ObjectTypeDB::bind_native_method(METHOD_FLAGS_DEFAULT,"call:Variant",&Object::_call_bind,mi,defargs); + + ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"call:Variant",&Object::_call_bind,mi); } { MethodInfo mi; mi.name="call_deferred"; mi.arguments.push_back( PropertyInfo( Variant::STRING, "method")); - Vector defargs; - for(int i=0;i