From 8bd92a96a40b6d680c2e416f86fae30757766bf3 Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Tue, 29 Aug 2017 18:16:03 +0200 Subject: Makes built-in vararg methods actual vararg methods - Removes hardcoded parameters from built-in vararg methods and adds METHOD_FLAG_VARARG to them. - Makes EditorHelp display built-in vararg methods correctly. --- modules/gdscript/gd_editor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/gdscript/gd_editor.cpp') diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index 376a0f4341..fb895b6922 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -1863,11 +1863,11 @@ static void _find_call_arguments(GDCompletionContext &context, const GDParser::N arghint += ", "; else arghint += " "; - if (i == p_argidx) { + if (i == p_argidx || (mi.flags & METHOD_FLAG_VARARG && i > p_argidx)) { arghint += String::chr(0xFFFF); } arghint += _get_visual_datatype(mi.arguments[i]) + " " + mi.arguments[i].name; - if (i == p_argidx) { + if (i == p_argidx || (mi.flags & METHOD_FLAG_VARARG && i > p_argidx)) { arghint += String::chr(0xFFFF); } } -- cgit v1.2.3