Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

No-inline `~MethodInfo` and `~PropertyInfo` destructors to save on binary size.

Lukas Tenbrinkf5999c47077f
diff --git a/core/object/method_info.h b/core/object/method_info.h
index 2c71126edbb..1f79457b67c 100644
--- a/core/object/method_info.h
+++ b/core/object/method_info.h
@@ -120,4 +120,13 @@ struct MethodInfo {
name = p_name;
arguments = Vector<PropertyInfo>{ p_params... };
}
+
+ // Need to be declared because ~MethodInfo is specified.
+ MethodInfo(const MethodInfo &) = default;
+ MethodInfo(MethodInfo &&) = default;
+ MethodInfo &operator=(const MethodInfo &) = default;
+ MethodInfo &operator=(MethodInfo &&) = default;
+
+ // This is _NO_INLINE_ to save on binary size.
+ _NO_INLINE_ ~MethodInfo() = default;
};
diff --git a/core/object/property_info.h b/core/object/property_info.h
index e1fe2c0e3cc..01aaedf32f4 100644
--- a/core/object/property_info.h
+++ b/core/object/property_info.h
@@ -184,6 +184,15 @@ struct PropertyInfo {
bool operator<(const PropertyInfo &p_info) const {
return name < p_info.name;
}
+
+ // Need to be declared because ~PropertyInfo is specified.
+ PropertyInfo(const PropertyInfo &) = default;
+ PropertyInfo(PropertyInfo &&) = default;
+ PropertyInfo &operator=(const PropertyInfo &) = default;
+ PropertyInfo &operator=(PropertyInfo &&) = default;
+
+ // This is _NO_INLINE_ to save on binary size.
+ _NO_INLINE_ ~PropertyInfo() = default;
};
TypedArray<Dictionary> convert_property_list(const List<PropertyInfo> *p_list);