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 --- core/math/basis.cpp | 2 +- core/math/basis.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'core/math') 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; -- cgit v1.2.3