summaryrefslogtreecommitdiff
path: root/core/math
diff options
context:
space:
mode:
authorMarcel Admiraal <madmiraal@users.noreply.github.com>2020-09-04 09:18:19 +0100
committerMarcel Admiraal <madmiraal@users.noreply.github.com>2020-09-04 09:18:19 +0100
commitce263c4ff680f28594ffc1886a4f418c50c41ef7 (patch)
tree08a46d913d177d335fc639931994845fa97e7fcc /core/math
parent27763b67bb63139319bf611590c40e48663e72d6 (diff)
Ensure assignment operators return by reference to avoid unnecessary copies.
Diffstat (limited to 'core/math')
-rw-r--r--core/math/audio_frame.h2
-rw-r--r--core/math/quat.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/math/audio_frame.h b/core/math/audio_frame.h
index 91f533eafb..43d4a63cd3 100644
--- a/core/math/audio_frame.h
+++ b/core/math/audio_frame.h
@@ -121,7 +121,7 @@ struct AudioFrame {
r = p_frame.r;
}
- _ALWAYS_INLINE_ AudioFrame operator=(const AudioFrame &p_frame) {
+ _ALWAYS_INLINE_ AudioFrame &operator=(const AudioFrame &p_frame) {
l = p_frame.l;
r = p_frame.r;
return *this;
diff --git a/core/math/quat.h b/core/math/quat.h
index 64d0f00912..8619ea3c5c 100644
--- a/core/math/quat.h
+++ b/core/math/quat.h
@@ -130,7 +130,7 @@ public:
w(q.w) {
}
- Quat operator=(const Quat &q) {
+ Quat &operator=(const Quat &q) {
x = q.x;
y = q.y;
z = q.z;