mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Add is_zero_constructible to denote if a type can be semi-trivially constructed with all 0 bytes.
Optimize `CowData` and `LocalVector` resize for zero constructible types. Mark several compatible types as `is_zero_constructible`.
This commit is contained in:
@@ -334,3 +334,6 @@ bool Vector3i::operator>=(const Vector3i &p_v) const {
|
||||
void Vector3i::zero() {
|
||||
x = y = z = 0;
|
||||
}
|
||||
|
||||
template <>
|
||||
struct is_zero_constructible<Vector3i> : std::true_type {};
|
||||
|
||||
Reference in New Issue
Block a user