Cleanup: pass arguments by const reference instead of value
This commit is contained in:
@@ -49,7 +49,10 @@ class FileOutput {
|
||||
public:
|
||||
/* Allocate and initialize the internal render result of the file output using the give
|
||||
* parameters. See the implementation for more information. */
|
||||
FileOutput(std::string path, ImageFormatData format, int2 size, bool save_as_render);
|
||||
FileOutput(const std::string &path,
|
||||
const ImageFormatData &format,
|
||||
int2 size,
|
||||
bool save_as_render);
|
||||
|
||||
/* Free the internal render result. */
|
||||
~FileOutput();
|
||||
|
||||
@@ -36,7 +36,7 @@ class DistortionGridKey {
|
||||
DistortionType type;
|
||||
int2 calibration_size;
|
||||
|
||||
DistortionGridKey(MovieTrackingCamera camera,
|
||||
DistortionGridKey(const MovieTrackingCamera &camera,
|
||||
int2 size,
|
||||
DistortionType type,
|
||||
int2 calibration_size);
|
||||
|
||||
@@ -22,9 +22,9 @@ class OCIOColorSpaceConversionShaderKey {
|
||||
std::string target;
|
||||
std::string config_cache_id;
|
||||
|
||||
OCIOColorSpaceConversionShaderKey(std::string source,
|
||||
std::string target,
|
||||
std::string config_cache_id);
|
||||
OCIOColorSpaceConversionShaderKey(const std::string &source,
|
||||
const std::string &target,
|
||||
const std::string &config_cache_id);
|
||||
|
||||
uint64_t hash() const;
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace blender::realtime_compositor {
|
||||
* Distortion Grid Key.
|
||||
*/
|
||||
|
||||
DistortionGridKey::DistortionGridKey(MovieTrackingCamera camera,
|
||||
DistortionGridKey::DistortionGridKey(const MovieTrackingCamera &camera,
|
||||
int2 size,
|
||||
DistortionType type,
|
||||
int2 calibration_size)
|
||||
|
||||
@@ -34,9 +34,8 @@ namespace blender::realtime_compositor {
|
||||
* OCIO Color Space Conversion Shader Key.
|
||||
*/
|
||||
|
||||
OCIOColorSpaceConversionShaderKey::OCIOColorSpaceConversionShaderKey(std::string source,
|
||||
std::string target,
|
||||
std::string config_cache_id)
|
||||
OCIOColorSpaceConversionShaderKey::OCIOColorSpaceConversionShaderKey(
|
||||
const std::string &source, const std::string &target, const std::string &config_cache_id)
|
||||
: source(source), target(target), config_cache_id(config_cache_id)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -34,7 +34,10 @@ namespace blender::realtime_compositor {
|
||||
* File Output
|
||||
*/
|
||||
|
||||
FileOutput::FileOutput(std::string path, ImageFormatData format, int2 size, bool save_as_render)
|
||||
FileOutput::FileOutput(const std::string &path,
|
||||
const ImageFormatData &format,
|
||||
int2 size,
|
||||
bool save_as_render)
|
||||
: path_(path), format_(format), save_as_render_(save_as_render)
|
||||
{
|
||||
render_result_ = MEM_cnew<RenderResult>("Temporary Render Result For File Output");
|
||||
|
||||
Reference in New Issue
Block a user