diff options
Diffstat (limited to 'core/variant/variant.h')
-rw-r--r-- | core/variant/variant.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/core/variant/variant.h b/core/variant/variant.h index bfa110842a..ea75dce4ce 100644 --- a/core/variant/variant.h +++ b/core/variant/variant.h @@ -54,6 +54,7 @@ #include "core/os/keyboard.h" #include "core/string/node_path.h" #include "core/string/ustring.h" +#include "core/templates/paged_allocator.h" #include "core/templates/rid.h" #include "core/variant/array.h" #include "core/variant/callable.h" @@ -134,6 +135,24 @@ public: }; private: + struct Pools { + union BucketSmall { + BucketSmall() {} + ~BucketSmall() {} + Transform2D _transform2d; + ::AABB _aabb; + }; + union BucketLarge { + BucketLarge() {} + ~BucketLarge() {} + Basis _basis; + Transform3D _transform3d; + }; + + static PagedAllocator<BucketSmall, true> _bucket_small; + static PagedAllocator<BucketLarge, true> _bucket_large; + }; + friend struct _VariantCall; friend class VariantInternal; // Variant takes 20 bytes when real_t is float, and 36 if double |