adds Array::make and Dictionary::make static methods and has variadic template functions use those
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <gdnative/array.h>
|
||||
|
||||
#include "Defs.hpp"
|
||||
#include "String.hpp"
|
||||
|
||||
namespace godot {
|
||||
@@ -39,6 +40,11 @@ public:
|
||||
|
||||
Array(const PoolColorArray& a);
|
||||
|
||||
template <class... Args>
|
||||
static Array make(Args... args) {
|
||||
return helpers::append_all(Array(), args...);
|
||||
}
|
||||
|
||||
Variant& operator [](const int idx);
|
||||
|
||||
Variant operator [](const int idx) const;
|
||||
|
||||
Reference in New Issue
Block a user