summaryrefslogtreecommitdiff
path: root/core/math
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-10 15:43:15 +0200
committerGitHub <noreply@github.com>2019-07-10 15:43:15 +0200
commit34d74840396853f561964c3f4f6e56ac63a57640 (patch)
tree7a60acf577ea05294f46242f6b934d6661cf75ee /core/math
parent8b778f62347e7aff48122aa3945f1373b3fae5d3 (diff)
parent01cc7a996babc9173a393bf3dae080dc14a277c9 (diff)
Merge pull request #30455 from qarmin/const_reference
Pass by reference to const
Diffstat (limited to 'core/math')
-rw-r--r--core/math/basis.cpp2
-rw-r--r--core/math/basis.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/math/basis.cpp b/core/math/basis.cpp
index 1540bc8fe1..400f342018 100644
--- a/core/math/basis.cpp
+++ b/core/math/basis.cpp
@@ -852,7 +852,7 @@ void Basis::set_quat_scale(const Quat &p_quat, const Vector3 &p_scale) {
rotate(p_quat);
}
-void Basis::set_diagonal(const Vector3 p_diag) {
+void Basis::set_diagonal(const Vector3 &p_diag) {
elements[0][0] = p_diag.x;
elements[0][1] = 0;
elements[0][2] = 0;
diff --git a/core/math/basis.h b/core/math/basis.h
index 75037c2c52..d3adad3d90 100644
--- a/core/math/basis.h
+++ b/core/math/basis.h
@@ -153,7 +153,7 @@ public:
int get_orthogonal_index() const;
void set_orthogonal_index(int p_index);
- void set_diagonal(const Vector3 p_diag);
+ void set_diagonal(const Vector3 &p_diag);
bool is_orthogonal() const;
bool is_diagonal() const;