@@ -623,7 +623,9 @@ def generate_builtin_class_source(builtin_api, size, used_classes, fully_used_cl
623
623
# Move constructor.
624
624
result .append (f"{ class_name } ::{ class_name } ({ class_name } &&other) {{" )
625
625
if needs_copy_instead_of_move (class_name ) and copy_constructor_index >= 0 :
626
- result .append (f"\t internal::_call_builtin_constructor(_method_bindings.constructor_{ copy_constructor_index } , &opaque, &other);" )
626
+ result .append (
627
+ f"\t internal::_call_builtin_constructor(_method_bindings.constructor_{ copy_constructor_index } , &opaque, &other);"
628
+ )
627
629
else :
628
630
result .append ("\t std::swap(opaque, other.opaque);" )
629
631
result .append ("}" )
@@ -741,7 +743,9 @@ def generate_builtin_class_source(builtin_api, size, used_classes, fully_used_cl
741
743
# Move assignment.
742
744
result .append (f"{ class_name } &{ class_name } ::operator=({ class_name } &&other) {{" )
743
745
if needs_copy_instead_of_move (class_name ) and copy_constructor_index >= 0 :
744
- result .append (f"\t internal::_call_builtin_constructor(_method_bindings.constructor_{ copy_constructor_index } , &opaque, &other);" )
746
+ result .append (
747
+ f"\t internal::_call_builtin_constructor(_method_bindings.constructor_{ copy_constructor_index } , &opaque, &other);"
748
+ )
745
749
else :
746
750
result .append ("\t std::swap(opaque, other.opaque);" )
747
751
result .append ("\t return *this;" )
@@ -1626,6 +1630,7 @@ def is_packed_array(type_name):
1626
1630
"PackedVector3Array" ,
1627
1631
]
1628
1632
1633
+
1629
1634
def needs_copy_instead_of_move (type_name ):
1630
1635
"""
1631
1636
Those are types which need initialised data or we'll get warning spam so need a copy instead of move.
@@ -1634,6 +1639,7 @@ def needs_copy_instead_of_move(type_name):
1634
1639
"Dictionary" ,
1635
1640
]
1636
1641
1642
+
1637
1643
def is_enum (type_name ):
1638
1644
return type_name .startswith ("enum::" )
1639
1645
0 commit comments