diff --git a/source/blender/draw/intern/draw_command.cc b/source/blender/draw/intern/draw_command.cc index 65360791f9a..f5486aba00f 100644 --- a/source/blender/draw/intern/draw_command.cc +++ b/source/blender/draw/intern/draw_command.cc @@ -501,7 +501,7 @@ std::string Draw::serialize() const ")"; } -std::string DrawMulti::serialize(std::string line_prefix) const +std::string DrawMulti::serialize(const std::string &line_prefix) const { DrawMultiBuf::DrawGroupBuf &groups = multi_draw_buf->group_buf_; diff --git a/source/blender/draw/intern/draw_command.hh b/source/blender/draw/intern/draw_command.hh index 2691b453581..abfa16da7be 100644 --- a/source/blender/draw/intern/draw_command.hh +++ b/source/blender/draw/intern/draw_command.hh @@ -371,7 +371,7 @@ struct DrawMulti { uint uuid; void execute(RecordingState &state) const; - std::string serialize(std::string line_prefix) const; + std::string serialize(const std::string &line_prefix) const; }; struct DrawIndirect { diff --git a/source/blender/io/usd/hydra/volume_modifier.cc b/source/blender/io/usd/hydra/volume_modifier.cc index 023b3dfcff0..d2bb1e11ede 100644 --- a/source/blender/io/usd/hydra/volume_modifier.cc +++ b/source/blender/io/usd/hydra/volume_modifier.cc @@ -123,7 +123,7 @@ void VolumeModifierData::write_transform() transform *= gf_matrix_from_transform(object->object_to_world().ptr()); } -std::string VolumeModifierData::get_cached_file_path(std::string directory, int frame) +std::string VolumeModifierData::get_cached_file_path(const std::string &directory, int frame) { char file_path[FILE_MAX]; char file_name[32]; diff --git a/source/blender/io/usd/hydra/volume_modifier.hh b/source/blender/io/usd/hydra/volume_modifier.hh index cdf3083ce1c..982e6b394da 100644 --- a/source/blender/io/usd/hydra/volume_modifier.hh +++ b/source/blender/io/usd/hydra/volume_modifier.hh @@ -25,7 +25,7 @@ class VolumeModifierData : public VolumeData { void write_transform() override; private: - std::string get_cached_file_path(std::string directory, int frame); + std::string get_cached_file_path(const std::string &directory, int frame); const FluidModifierData *modifier_; }; diff --git a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc index a59fb8a7d7c..98498d9ec2b 100644 --- a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc +++ b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc @@ -161,7 +161,7 @@ class ObjExporterWriterTest : public testing::Test { } std::unique_ptr init_writer(const OBJExportParams ¶ms, - const std::string out_filepath) + const std::string &out_filepath) { try { auto writer = std::make_unique(out_filepath.c_str(), params); diff --git a/source/blender/makesrna/intern/rna_sequencer.cc b/source/blender/makesrna/intern/rna_sequencer.cc index ccf541af6d5..d3d4d961319 100644 --- a/source/blender/makesrna/intern/rna_sequencer.cc +++ b/source/blender/makesrna/intern/rna_sequencer.cc @@ -970,7 +970,7 @@ static int rna_Sequence_input_count_get(PointerRNA *ptr) } static void rna_Sequence_input_set(PointerRNA *ptr, - PointerRNA ptr_value, + const PointerRNA &ptr_value, ReportList *reports, int input_num) { diff --git a/source/blender/python/intern/bpy_interface.cc b/source/blender/python/intern/bpy_interface.cc index 880614a3b5e..b26e9f3526b 100644 --- a/source/blender/python/intern/bpy_interface.cc +++ b/source/blender/python/intern/bpy_interface.cc @@ -316,7 +316,7 @@ static _inittab bpy_internal_modules[] = { * Show an error just to avoid silent failure in the unlikely event something goes wrong, * in this case a developer will need to track down the root cause. */ -static void pystatus_exit_on_error(PyStatus status) +static void pystatus_exit_on_error(const PyStatus &status) { if (UNLIKELY(PyStatus_Exception(status))) { fputs("Internal error initializing Python!\n", stderr); diff --git a/source/blender/sequencer/intern/strip_retiming.cc b/source/blender/sequencer/intern/strip_retiming.cc index 3a063e300f6..e7d51dfdd6c 100644 --- a/source/blender/sequencer/intern/strip_retiming.cc +++ b/source/blender/sequencer/intern/strip_retiming.cc @@ -620,7 +620,7 @@ class RetimingRange { /* Create new range representing overlap of 2 ranges. * Returns overlapping range. */ - RetimingRange operator*(const RetimingRange rhs_range) + RetimingRange operator*(const RetimingRange &rhs_range) { RetimingRange new_range = RetimingRange(0, 0, 0, LINEAR); @@ -732,7 +732,7 @@ class RetimingRangeData { } } - RetimingRangeData &operator*=(const RetimingRangeData rhs) + RetimingRangeData &operator*=(const RetimingRangeData &rhs) { if (ranges.is_empty()) { for (const RetimingRange &rhs_range : rhs.ranges) {