summaryrefslogtreecommitdiffstats
path: root/include/core/Array.hpp
diff options
context:
space:
mode:
authordanielytics <danielytics@users.noreply.github.com>2018-03-07 10:27:34 +0000
committerdanielytics <danielytics@users.noreply.github.com>2018-03-07 10:27:34 +0000
commit01db553c49345b683ff9da3283bc92a8c2933af2 (patch)
treea8903fdf5e01999ee15065176bb6048d54a0b35d /include/core/Array.hpp
parentc7b03c4132f9be5846141fb101f8f89522eb8efa (diff)
downloadredot-cpp-01db553c49345b683ff9da3283bc92a8c2933af2.tar.gz
adds Array::make and Dictionary::make static methods and has variadic template functions use those
Diffstat (limited to 'include/core/Array.hpp')
-rw-r--r--include/core/Array.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/core/Array.hpp b/include/core/Array.hpp
index 2320568..ead3ba3 100644
--- a/include/core/Array.hpp
+++ b/include/core/Array.hpp
@@ -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;