Merge pull request #270 from Windfisch/add-variant-cast

Add a type conversion to Variant for anything that supports ___get_from_variant()
pull/286/head
Bastiaan Olij 2019-05-02 23:03:06 +10:00 committed by GitHub
commit 12732b5391
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -226,6 +226,7 @@ public:
operator NodePath() const;
operator RID() const;
operator godot_object *() const;
template <typename T> operator T*() const { return static_cast<T*>(T::___get_from_variant(*this)); }
operator Dictionary() const;
operator Array() const;