Drake's trivially copyable optimop

This commit is contained in:
Lirusaito
2019-04-11 05:02:43 -04:00
parent 7fc90d3dce
commit c9eac98d53
20 changed files with 52 additions and 65 deletions

View File

@@ -117,7 +117,7 @@ public:
const LLVector4 &pos); // Initializes Matrix with Euler angles
LLMatrix4(const F32 roll, const F32 pitch, const F32 yaw); // Initializes Matrix with Euler angles
~LLMatrix4(void); // Destructor
~LLMatrix4() = default; // Destructor
LLSD getValue() const;
void setValue(const LLSD&);
@@ -246,6 +246,8 @@ public:
friend std::ostream& operator<<(std::ostream& s, const LLMatrix4 &a); // Stream a
};
static_assert(std::is_trivially_copyable<LLMatrix4>{}, "LLMatrix4 must be a trivially copyable type");
inline const LLMatrix4& LLMatrix4::setIdentity()
{
mMatrix[0][0] = 1.f;