Skip to content

Commit 1a1be13

Browse files
committed
Revert "Initialize Quaternion variant with identity"
This reverts commit 3797928. This may be correct, but it breaks compatibility so it shouldn't be cherry-picked to stable branches.
1 parent 3797928 commit 1a1be13

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

core/variant/variant_internal.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ class VariantInternal {
5454
case Variant::TRANSFORM2D:
5555
init_transform2d(v);
5656
break;
57-
case Variant::QUATERNION:
58-
init_quaternion(v);
59-
break;
6057
case Variant::AABB:
6158
init_aabb(v);
6259
break;
@@ -226,7 +223,7 @@ class VariantInternal {
226223

227224
// Should be in the same order as Variant::Type for consistency.
228225
// Those primitive and vector types don't need an `init_` method:
229-
// Nil, bool, float, Vector2/i, Rect2/i, Vector3/i, Plane, RID.
226+
// Nil, bool, float, Vector2/i, Rect2/i, Vector3/i, Plane, Quat, RID.
230227
// Object is a special case, handled via `object_assign_null`.
231228
_FORCE_INLINE_ static void init_string(Variant *v) {
232229
memnew_placement(v->_data._mem, String);
@@ -237,10 +234,6 @@ class VariantInternal {
237234
memnew_placement(v->_data._transform2d, Transform2D);
238235
v->type = Variant::TRANSFORM2D;
239236
}
240-
_FORCE_INLINE_ static void init_quaternion(Variant *v) {
241-
memnew_placement(v->_data._mem, Quaternion);
242-
v->type = Variant::QUATERNION;
243-
}
244237
_FORCE_INLINE_ static void init_aabb(Variant *v) {
245238
v->_data._aabb = (AABB *)Variant::Pools::_bucket_small.alloc();
246239
memnew_placement(v->_data._aabb, AABB);

0 commit comments

Comments
 (0)