diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-12-02 17:34:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-02 17:34:45 +0100 |
commit | 892a5a72cd9b25dc660671b9f4244fd842884b9f (patch) | |
tree | fb410b4b5daa1e8a79dc9f7983c43bcd9b196e8f /core/math | |
parent | 11d5b91462285d9fc541c20331aedcd4511908cd (diff) | |
parent | 7da392bcc52366740394322728464e724cf20cdf (diff) |
Merge pull request #55474 from akien-mga/copy-operators-no-reference
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/audio_frame.h | 3 | ||||
-rw-r--r-- | core/math/quaternion.h | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/core/math/audio_frame.h b/core/math/audio_frame.h index a5616b8d79..4a11b99fe8 100644 --- a/core/math/audio_frame.h +++ b/core/math/audio_frame.h @@ -124,10 +124,9 @@ struct AudioFrame { r = p_frame.r; } - _ALWAYS_INLINE_ AudioFrame &operator=(const AudioFrame &p_frame) { + _ALWAYS_INLINE_ void operator=(const AudioFrame &p_frame) { l = p_frame.l; r = p_frame.r; - return *this; } _ALWAYS_INLINE_ operator Vector2() const { diff --git a/core/math/quaternion.h b/core/math/quaternion.h index d8d0c06672..457d167516 100644 --- a/core/math/quaternion.h +++ b/core/math/quaternion.h @@ -134,12 +134,11 @@ public: w(p_q.w) { } - Quaternion &operator=(const Quaternion &p_q) { + void operator=(const Quaternion &p_q) { x = p_q.x; y = p_q.y; z = p_q.z; w = p_q.w; - return *this; } Quaternion(const Vector3 &v0, const Vector3 &v1) // shortest arc |