diff options
author | marxin <mliska@suse.cz> | 2019-03-02 13:32:29 +0100 |
---|---|---|
committer | marxin <mliska@suse.cz> | 2019-03-02 14:37:02 +0100 |
commit | 6be77da7eb817fc1f8469bd0bdd8a0d08167e701 (patch) | |
tree | b2336f6475e60652d110138ae36307aff6e9205e /core/math | |
parent | a42549b8f703754a43bad2557357cb7046874118 (diff) |
Fix new GCC 9 warnings: -Wdeprecated-copy.
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/audio_frame.h | 6 | ||||
-rw-r--r-- | core/math/quat.h | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/core/math/audio_frame.h b/core/math/audio_frame.h index f970c510e0..ebe0356c93 100644 --- a/core/math/audio_frame.h +++ b/core/math/audio_frame.h @@ -122,6 +122,12 @@ struct AudioFrame { r = p_frame.r; } + _ALWAYS_INLINE_ AudioFrame operator=(const AudioFrame &p_frame) { + l = p_frame.l; + r = p_frame.r; + return *this; + } + _ALWAYS_INLINE_ AudioFrame() {} }; diff --git a/core/math/quat.h b/core/math/quat.h index 7d71ec03e8..8ed2fa7cc2 100644 --- a/core/math/quat.h +++ b/core/math/quat.h @@ -131,6 +131,14 @@ public: w(q.w) { } + Quat operator=(const Quat &q) { + x = q.x; + y = q.y; + z = q.z; + w = q.w; + return *this; + } + Quat(const Vector3 &v0, const Vector3 &v1) // shortest arc { Vector3 c = v0.cross(v1); |