[Bf-blender-cvs] [bfb0b1deccc] master: Cleanup: pass matrix & vector by const reference instead of value

Campbell Barton noreply at git.blender.org
Thu Jan 5 08:12:21 CET 2023


Commit: bfb0b1deccc2c66f9924a3686b5363144bd3e40c
Author: Campbell Barton
Date:   Thu Jan 5 18:10:11 2023 +1100
Branches: master
https://developer.blender.org/rBbfb0b1deccc2c66f9924a3686b5363144bd3e40c

Cleanup: pass matrix & vector by const reference instead of value

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

M	source/blender/compositor/realtime_compositor/COM_domain.hh
M	source/blender/compositor/realtime_compositor/intern/domain.cc

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

diff --git a/source/blender/compositor/realtime_compositor/COM_domain.hh b/source/blender/compositor/realtime_compositor/COM_domain.hh
index 99b40ae61cf..0e975afb1e2 100644
--- a/source/blender/compositor/realtime_compositor/COM_domain.hh
+++ b/source/blender/compositor/realtime_compositor/COM_domain.hh
@@ -143,9 +143,9 @@ class Domain {
 
  public:
   /* A size only constructor that sets the transformation to identity. */
-  Domain(int2 size);
+  Domain(const int2 &size);
 
-  Domain(int2 size, float3x3 transformation);
+  Domain(const int2 &size, const float3x3 &transformation);
 
   /* Transform the domain by the given transformation. This effectively pre-multiply the given
    * transformation by the current transformation of the domain. */
diff --git a/source/blender/compositor/realtime_compositor/intern/domain.cc b/source/blender/compositor/realtime_compositor/intern/domain.cc
index 31b297c212e..489e73d74ce 100644
--- a/source/blender/compositor/realtime_compositor/intern/domain.cc
+++ b/source/blender/compositor/realtime_compositor/intern/domain.cc
@@ -7,11 +7,12 @@
 
 namespace blender::realtime_compositor {
 
-Domain::Domain(int2 size) : size(size), transformation(float3x3::identity())
+Domain::Domain(const int2 &size) : size(size), transformation(float3x3::identity())
 {
 }
 
-Domain::Domain(int2 size, float3x3 transformation) : size(size), transformation(transformation)
+Domain::Domain(const int2 &size, const float3x3 &transformation)
+    : size(size), transformation(transformation)
 {
 }



More information about the Bf-blender-cvs mailing list