From 01cc7a996babc9173a393bf3dae080dc14a277c9 Mon Sep 17 00:00:00 2001 From: qarmin Date: Wed, 10 Jul 2019 11:54:12 +0200 Subject: Use reference to constant in functions --- servers/arvr/arvr_positional_tracker.cpp | 2 +- servers/arvr/arvr_positional_tracker.h | 2 +- servers/arvr_server.cpp | 2 +- servers/arvr_server.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'servers') diff --git a/servers/arvr/arvr_positional_tracker.cpp b/servers/arvr/arvr_positional_tracker.cpp index aabe617a8a..cbda3556c5 100644 --- a/servers/arvr/arvr_positional_tracker.cpp +++ b/servers/arvr/arvr_positional_tracker.cpp @@ -79,7 +79,7 @@ ARVRServer::TrackerType ARVRPositionalTracker::get_type() const { return type; }; -void ARVRPositionalTracker::set_name(const String p_name) { +void ARVRPositionalTracker::set_name(const String &p_name) { name = p_name; }; diff --git a/servers/arvr/arvr_positional_tracker.h b/servers/arvr/arvr_positional_tracker.h index 0d6a69540f..775579b089 100644 --- a/servers/arvr/arvr_positional_tracker.h +++ b/servers/arvr/arvr_positional_tracker.h @@ -73,7 +73,7 @@ protected: public: void set_type(ARVRServer::TrackerType p_type); ARVRServer::TrackerType get_type() const; - void set_name(const String p_name); + void set_name(const String &p_name); StringName get_name() const; int get_tracker_id() const; void set_joy_id(int p_joy_id); diff --git a/servers/arvr_server.cpp b/servers/arvr_server.cpp index 7d89764d20..f7ce1d3c5d 100644 --- a/servers/arvr_server.cpp +++ b/servers/arvr_server.cpp @@ -100,7 +100,7 @@ Transform ARVRServer::get_world_origin() const { return world_origin; }; -void ARVRServer::set_world_origin(const Transform p_world_origin) { +void ARVRServer::set_world_origin(const Transform &p_world_origin) { world_origin = p_world_origin; }; diff --git a/servers/arvr_server.h b/servers/arvr_server.h index e7d635a8d9..c0301ebaab 100644 --- a/servers/arvr_server.h +++ b/servers/arvr_server.h @@ -123,7 +123,7 @@ public: and in the virtual world out of sync */ Transform get_world_origin() const; - void set_world_origin(const Transform p_world_origin); + void set_world_origin(const Transform &p_world_origin); /* center_on_hmd calculates a new reference frame. This ensures the HMD is positioned to 0,0,0 facing 0,0,-1 (need to verify this direction) -- cgit v1.2.3