summaryrefslogtreecommitdiff
path: root/modules/gdscript/gd_functions.cpp
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2017-08-29 18:16:03 +0200
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2017-08-29 19:40:28 +0200
commit8bd92a96a40b6d680c2e416f86fae30757766bf3 (patch)
treee09471df325d54a94ce7336f913980a162f3a2e0 /modules/gdscript/gd_functions.cpp
parentddb1ce08c3cf5f9b978566c8196b9f387d3edf9a (diff)
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.
Diffstat (limited to 'modules/gdscript/gd_functions.cpp')
-rw-r--r--modules/gdscript/gd_functions.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/modules/gdscript/gd_functions.cpp b/modules/gdscript/gd_functions.cpp
index 5fa8ab273c..f0cfdd6258 100644
--- a/modules/gdscript/gd_functions.cpp
+++ b/modules/gdscript/gd_functions.cpp
@@ -1572,43 +1572,49 @@ MethodInfo GDFunctions::get_info(Function p_func) {
} break;
case TEXT_STR: {
- MethodInfo mi("str", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "..."));
+ MethodInfo mi("str");
mi.return_val.type = Variant::STRING;
+ mi.flags |= METHOD_FLAG_VARARG;
return mi;
} break;
case TEXT_PRINT: {
- MethodInfo mi("print", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "..."));
+ MethodInfo mi("print");
mi.return_val.type = Variant::NIL;
+ mi.flags |= METHOD_FLAG_VARARG;
return mi;
} break;
case TEXT_PRINT_TABBED: {
- MethodInfo mi("printt", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "..."));
+ MethodInfo mi("printt");
mi.return_val.type = Variant::NIL;
+ mi.flags |= METHOD_FLAG_VARARG;
return mi;
} break;
case TEXT_PRINT_SPACED: {
- MethodInfo mi("prints", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "..."));
+ MethodInfo mi("prints");
mi.return_val.type = Variant::NIL;
+ mi.flags |= METHOD_FLAG_VARARG;
return mi;
} break;
case TEXT_PRINTERR: {
- MethodInfo mi("printerr", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "..."));
+ MethodInfo mi("printerr");
mi.return_val.type = Variant::NIL;
+ mi.flags |= METHOD_FLAG_VARARG;
return mi;
} break;
case TEXT_PRINTRAW: {
- MethodInfo mi("printraw", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "..."));
+ MethodInfo mi("printraw");
mi.return_val.type = Variant::NIL;
+ mi.flags |= METHOD_FLAG_VARARG;
return mi;
} break;
@@ -1640,8 +1646,9 @@ MethodInfo GDFunctions::get_info(Function p_func) {
} break;
case GEN_RANGE: {
- MethodInfo mi("range", PropertyInfo(Variant::NIL, "..."));
+ MethodInfo mi("range");
mi.return_val.type = Variant::ARRAY;
+ mi.flags |= METHOD_FLAG_VARARG;
return mi;
} break;
case RESOURCE_LOAD: {