mirror of
https://github.com/godotengine/godot.git
synced 2026-02-07 19:32:36 +00: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:
@@ -362,3 +362,6 @@ bool Vector4i::operator>=(const Vector4i &p_v) const {
|
||||
void Vector4i::zero() {
|
||||
x = y = z = w = 0;
|
||||
}
|
||||
|
||||
template <>
|
||||
struct is_zero_constructible<Vector4i> : std::true_type {};
|
||||
|
||||
Reference in New Issue
Block a user