diff options
author | David Snopek <dsnopek@gmail.com> | 2024-02-01 14:22:26 -0600 |
---|---|---|
committer | David Snopek <dsnopek@gmail.com> | 2024-02-26 10:36:16 -0600 |
commit | c4fde852e69e3f28975a60630ae2232f71321a56 (patch) | |
tree | ced8899ac862fbfa37131a736f41c74eb4d9cc4a /include/godot_cpp | |
parent | 36847f6af0be548bae96429fa84d59f407b51582 (diff) | |
download | redot-cpp-c4fde852e69e3f28975a60630ae2232f71321a56.tar.gz |
Avoid creating most objects that Godot is going to use placement new to initialize
Diffstat (limited to 'include/godot_cpp')
-rw-r--r-- | include/godot_cpp/variant/variant.hpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/godot_cpp/variant/variant.hpp b/include/godot_cpp/variant/variant.hpp index 3c64791..7ec04d2 100644 --- a/include/godot_cpp/variant/variant.hpp +++ b/include/godot_cpp/variant/variant.hpp @@ -47,8 +47,6 @@ class ObjectID; class Variant { uint8_t opaque[GODOT_CPP_VARIANT_SIZE]{ 0 }; - _FORCE_INLINE_ GDExtensionVariantPtr _native_ptr() const { return const_cast<uint8_t(*)[GODOT_CPP_VARIANT_SIZE]>(&opaque); } - friend class GDExtensionBinding; friend class MethodBind; @@ -145,6 +143,7 @@ private: static GDExtensionTypeFromVariantConstructorFunc to_type_constructor[VARIANT_MAX]; public: + _FORCE_INLINE_ GDExtensionVariantPtr _native_ptr() const { return const_cast<uint8_t(*)[GODOT_CPP_VARIANT_SIZE]>(&opaque); } Variant(); Variant(std::nullptr_t n) : Variant() {} |