summaryrefslogtreecommitdiff
path: root/core/object/object.h
diff options
context:
space:
mode:
authorJan Haller <bromeon@gmail.com>2022-06-06 22:24:13 +0200
committerJan Haller <bromeon@gmail.com>2022-06-29 19:30:01 +0200
commit60ffadd133ba2d3c44539f17a64b16b3448efd01 (patch)
tree681d427937294debc33d85d33236426d109a69d7 /core/object/object.h
parent44516d1a5c858ce0425f2c278a5a0a941dca44be (diff)
GDExtension: reuse code with constructor PropertyInfo(const GDNativePropertyInfo&)
Diffstat (limited to 'core/object/object.h')
-rw-r--r--core/object/object.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/object/object.h b/core/object/object.h
index e065634000..1f6386e6b4 100644
--- a/core/object/object.h
+++ b/core/object/object.h
@@ -190,6 +190,14 @@ struct PropertyInfo {
type(Variant::OBJECT),
class_name(p_class_name) {}
+ explicit PropertyInfo(const GDNativePropertyInfo &pinfo) :
+ type((Variant::Type)pinfo.type),
+ name(pinfo.name),
+ class_name(pinfo.class_name), // can be null
+ hint((PropertyHint)pinfo.hint),
+ hint_string(pinfo.hint_string), // can be null
+ usage(pinfo.usage) {}
+
bool operator==(const PropertyInfo &p_info) const {
return ((type == p_info.type) &&
(name == p_info.name) &&