Skip to content

Commit 527bf78

Browse files
committed
Merge pull request godotengine#91955 from Repiteo/core/variant-class-initializer
Core: Readd Variant class initializer, fix comment
2 parents 44833c7 + 7599a7b commit 527bf78

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

core/variant/variant.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,12 @@ class Variant {
165165

166166
friend struct _VariantCall;
167167
friend class VariantInternal;
168-
// Variant takes 20 bytes when real_t is float, and 36 if double
169-
// it only allocates extra memory for aabb/matrix.
168+
// Variant takes 24 bytes when real_t is float, and 40 bytes if double.
169+
// It only allocates extra memory for AABB/Transform2D (24, 48 if double),
170+
// Basis/Transform3D (48, 96 if double), Projection (64, 128 if double),
171+
// and PackedArray/Array/Dictionary (platform-dependent).
170172

171-
Type type;
173+
Type type = NIL;
172174

173175
struct ObjData {
174176
ObjectID id;

0 commit comments

Comments
 (0)