Skip to content

armgit / godot

Public Imported from GitHub
0

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

Destruct `~MethodDefinition` out of line, to save on binary space in debug binaries.

Lukas Tenbrink42708132c429
diff --git a/core/object/class_db.h b/core/object/class_db.h
index 0b7fa350e69..81ee1689aa7 100644
--- a/core/object/class_db.h
+++ b/core/object/class_db.h
@@ -71,6 +71,15 @@ struct MethodDefinition {
name(p_name) {}
MethodDefinition(const StringName &p_name) :
name(p_name) {}
+
+ // Need to be declared because ~MethodDefinition is specified.
+ MethodDefinition(const MethodDefinition &) = default;
+ MethodDefinition(MethodDefinition &&) = default;
+ MethodDefinition &operator=(const MethodDefinition &) = default;
+ MethodDefinition &operator=(MethodDefinition &&) = default;
+
+ // This is _NO_INLINE_ to save on binary size.
+ _NO_INLINE_ ~MethodDefinition() = default;
};
MethodDefinition D_METHODP(const char *p_name, const char *const **p_args, uint32_t p_argcount);