summaryrefslogtreecommitdiff
path: root/servers
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 /servers
parent27763b67bb63139319bf611590c40e48663e72d6 (diff)
Ensure assignment operators return by reference to avoid unnecessary copies.
Diffstat (limited to 'servers')
-rw-r--r--servers/physics_server_2d.h2
-rw-r--r--servers/physics_server_3d.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/servers/physics_server_2d.h b/servers/physics_server_2d.h
index e631046524..f609adccf9 100644
--- a/servers/physics_server_2d.h
+++ b/servers/physics_server_2d.h
@@ -644,7 +644,7 @@ class PhysicsServer2DManager {
name(p_ci.name),
create_callback(p_ci.create_callback) {}
- ClassInfo operator=(const ClassInfo &p_ci) {
+ ClassInfo &operator=(const ClassInfo &p_ci) {
name = p_ci.name;
create_callback = p_ci.create_callback;
return *this;
diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h
index dcb183aea4..b779942460 100644
--- a/servers/physics_server_3d.h
+++ b/servers/physics_server_3d.h
@@ -785,7 +785,7 @@ class PhysicsServer3DManager {
name(p_ci.name),
create_callback(p_ci.create_callback) {}
- ClassInfo operator=(const ClassInfo &p_ci) {
+ ClassInfo &operator=(const ClassInfo &p_ci) {
name = p_ci.name;
create_callback = p_ci.create_callback;
return *this;