diff options
author | Karroffel <therzog@mail.de> | 2017-04-04 02:28:05 +0200 |
---|---|---|
committer | Karroffel <therzog@mail.de> | 2017-04-04 02:28:05 +0200 |
commit | c40a9dce513099ead82ac5830d951b3e3dc00f86 (patch) | |
tree | de580e3c313657db567734ebe68f3821be874387 /include/godot_cpp | |
parent | fe4f8b95812cd7d4d5ba67473388d8ba287e7c21 (diff) | |
download | redot-cpp-c40a9dce513099ead82ac5830d951b3e3dc00f86.tar.gz |
Added Variant constructor for Object types
Diffstat (limited to 'include/godot_cpp')
-rw-r--r-- | include/godot_cpp/Godot.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/godot_cpp/Godot.hpp b/include/godot_cpp/Godot.hpp index 0fab5ba..64b76d4 100644 --- a/include/godot_cpp/Godot.hpp +++ b/include/godot_cpp/Godot.hpp @@ -13,9 +13,10 @@ namespace godot { #define GODOT_CLASS(Name, Base) \ - public: static char *___get_type_name() { return (char *) #Name; } \ - static char *___get_base_type_name() { return (char *) #Base; } \ - Name(godot_object *o) { __core_object = o; } \ + public: inline static char *___get_type_name() { return (char *) #Name; } \ + inline static char *___get_base_type_name() { return (char *) #Base; } \ + inline Name(godot_object *o) { __core_object = o; } \ + inline Name(const Variant& obj) { __core_object = ((Object) obj).__core_object; } \ private: @@ -539,7 +540,6 @@ void register_property(char *name, void (T::*setter)(P), P (T::*getter)(), P def attr.type = def_val.get_type(); attr.default_value = *(godot_variant *) &def_val; attr.hint = hint; - attr.listed = true; attr.rset_type = rpc_mode; attr.usage = usage; |