We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99a39ce commit 8f36c97Copy full SHA for 8f36c97
core/variant/variant.h
@@ -873,25 +873,9 @@ class Variant {
873
}
874
};
875
876
-//typedef Dictionary Dictionary; no
877
-//typedef Array Array;
878
-
879
template <typename... VarArgs>
880
Vector<Variant> varray(VarArgs... p_args) {
881
- Vector<Variant> v;
882
883
- Variant args[sizeof...(p_args) + 1] = { p_args..., Variant() }; // +1 makes sure zero sized arrays are also supported.
884
- uint32_t argc = sizeof...(p_args);
885
886
- if (argc > 0) {
887
- v.resize(argc);
888
- Variant *vw = v.ptrw();
889
890
- for (uint32_t i = 0; i < argc; i++) {
891
- vw[i] = args[i];
892
- }
893
894
- return v;
+ return Vector<Variant>{ p_args... };
895
896
897
struct VariantHasher {
0 commit comments