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

This commit is contained in:
Campbell Barton 2023-01-05 18:10:11 +11:00
parent 77c3e0895d
commit bfb0b1decc
2 changed files with 5 additions and 4 deletions

View File

@ -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. */

View File

@ -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)
{
}