From 39a13e4088db6e4023d196de07765363ddce2c4f Mon Sep 17 00:00:00 2001 From: Rye Date: Sun, 2 Feb 2025 03:40:21 -0500 Subject: Restore math types to trivially copyable and add static asserts --- indra/llmath/v4math.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llmath/v4math.h') diff --git a/indra/llmath/v4math.h b/indra/llmath/v4math.h index a4c9668fdd..f5b79759b0 100644 --- a/indra/llmath/v4math.h +++ b/indra/llmath/v4math.h @@ -146,6 +146,10 @@ class LLVector4 friend LLVector4 operator-(const LLVector4 &a); // Return vector -a }; +static_assert(std::is_trivially_copyable::value, "LLVector4 must be trivial copy"); +static_assert(std::is_trivially_move_assignable::value, "LLVector4 must be trivial move"); +static_assert(std::is_standard_layout::value, "LLVector4 must be a standard layout type"); + // Non-member functions F32 angle_between(const LLVector4 &a, const LLVector4 &b); // Returns angle (radians) between a and b bool are_parallel(const LLVector4 &a, const LLVector4 &b, F32 epsilon = F_APPROXIMATELY_ZERO); // Returns true if a and b are very close to parallel -- cgit v1.2.3