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 872b374b13..1749702c61 100644 --- a/core/variant/variant.h +++ b/core/variant/variant.h @@ -51,6 +51,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" @@ -128,6 +129,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 |