From 1e7ceac26c89cb30e2a880bc8f1595e8914730c3 Mon Sep 17 00:00:00 2001 From: cutealien Date: Thu, 6 Jan 2022 12:01:36 +0000 Subject: [PATCH] Remove assignment operator in quaternion. It's identical to the implicit one generated, so we don't need that. And it triggers warnings with -Wdeprecated in newer gcc. It's because the implicit definition of a copy constructor is deprecated if the class has a user-declared copy assignment operator. There's a few more warnings about that in Irrlicht, will have to check them in detail as the other cases are not as trivial to fix as this one. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6279 dfc29bdd-3216-0410-991c-e03cc46cb475 --- include/quaternion.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/include/quaternion.h b/include/quaternion.h index f816ada3..77a05995 100644 --- a/include/quaternion.h +++ b/include/quaternion.h @@ -55,9 +55,6 @@ class quaternion //! inequality operator bool operator!=(const quaternion& other) const; - //! Assignment operator - inline quaternion& operator=(const quaternion& other); - #ifndef IRR_TEST_BROKEN_QUATERNION_USE //! Matrix assignment operator inline quaternion& operator=(const matrix4& other); @@ -240,15 +237,6 @@ inline bool quaternion::operator!=(const quaternion& other) const return !(*this == other); } -// assignment operator -inline quaternion& quaternion::operator=(const quaternion& other) -{ - X = other.X; - Y = other.Y; - Z = other.Z; - W = other.W; - return *this; -} #ifndef IRR_TEST_BROKEN_QUATERNION_USE // matrix assignment operator