summaryrefslogtreecommitdiffstats
path: root/scene/3d/soft_body_3d.cpp
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 /scene/3d/soft_body_3d.cpp
parent27763b67bb63139319bf611590c40e48663e72d6 (diff)
downloadredot-engine-ce263c4ff680f28594ffc1886a4f418c50c41ef7.tar.gz
Ensure assignment operators return by reference to avoid unnecessary copies.
Diffstat (limited to 'scene/3d/soft_body_3d.cpp')
-rw-r--r--scene/3d/soft_body_3d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/soft_body_3d.cpp b/scene/3d/soft_body_3d.cpp
index a267c57f5e..d3d7cdc1ce 100644
--- a/scene/3d/soft_body_3d.cpp
+++ b/scene/3d/soft_body_3d.cpp
@@ -106,7 +106,7 @@ SoftBody3D::PinnedPoint::PinnedPoint(const PinnedPoint &obj_tocopy) {
offset = obj_tocopy.offset;
}
-SoftBody3D::PinnedPoint SoftBody3D::PinnedPoint::operator=(const PinnedPoint &obj) {
+SoftBody3D::PinnedPoint &SoftBody3D::PinnedPoint::operator=(const PinnedPoint &obj) {
point_index = obj.point_index;
spatial_attachment_path = obj.spatial_attachment_path;
spatial_attachment = obj.spatial_attachment;