[Bf-blender-cvs] [25ff42d7d5b] functions: use const ref parameter

Jacques Lucke noreply at git.blender.org
Sun Feb 10 20:25:36 CET 2019


Commit: 25ff42d7d5b9e508a7515eb63ccd6219e9628f98
Author: Jacques Lucke
Date:   Sun Jan 27 11:08:48 2019 +0100
Branches: functions
https://developer.blender.org/rB25ff42d7d5b9e508a7515eb63ccd6219e9628f98

use const ref parameter

===================================================================

M	source/blender/blenlib/BLI_small_vector.hpp

===================================================================

diff --git a/source/blender/blenlib/BLI_small_vector.hpp b/source/blender/blenlib/BLI_small_vector.hpp
index 222c8e0ca2f..07b002789c7 100644
--- a/source/blender/blenlib/BLI_small_vector.hpp
+++ b/source/blender/blenlib/BLI_small_vector.hpp
@@ -83,7 +83,7 @@ namespace BLI {
 			this->grow(size);
 		}
 
-		void append(T value)
+		void append(const T &value)
 		{
 			if (this->m_size >= this->m_capacity) {
 				this->grow(std::max(this->m_capacity * 2, (uint)1));
@@ -93,7 +93,7 @@ namespace BLI {
 			this->m_size++;
 		}
 
-		void fill(T value)
+		void fill(const T &value)
 		{
 			for (uint i = 0; i < this->m_size; i++) {
 				this->m_elements[i] = value;



More information about the Bf-blender-cvs mailing list