Create Variant built-in functions.

-Moved Expression to use this, removed its own.
-Eventually GDScript/VisualScript/GDNative need to be moved to this.
-Given the JSON functions were hacked-in, removed them and created a new JSONParser class
-Made sure these functions appear properly in documentation, since they will be removed from GDScript
This commit is contained in:
reduz 2020-11-10 18:31:33 -03:00
parent a80ec80b57
commit 5288ff538d
12 changed files with 1574 additions and 822 deletions

View file

@ -39,26 +39,6 @@
#include "core/templates/local_vector.h"
#include "core/templates/oa_hash_map.h"
_FORCE_INLINE_ void sarray_add_str(Vector<String> &arr) {
}
_FORCE_INLINE_ void sarray_add_str(Vector<String> &arr, const String &p_str) {
arr.push_back(p_str);
}
template <class... P>
_FORCE_INLINE_ void sarray_add_str(Vector<String> &arr, const String &p_str, P... p_args) {
arr.push_back(p_str);
sarray_add_str(arr, p_args...);
}
template <class... P>
_FORCE_INLINE_ Vector<String> sarray(P... p_args) {
Vector<String> arr;
sarray_add_str(arr, p_args...);
return arr;
}
template <class T, class... P>
class VariantConstructor {
template <size_t... Is>