[Bf-blender-cvs] [458c8d600dd] cycles-x: Fix using reference to a temporary variable in Cycles X

Sergey Sharybin noreply at git.blender.org
Tue Sep 14 10:41:41 CEST 2021


Commit: 458c8d600dd6d4b971e3737848b0bcebd7226e6f
Author: Sergey Sharybin
Date:   Tue Sep 14 10:41:17 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB458c8d600dd6d4b971e3737848b0bcebd7226e6f

Fix using reference to a temporary variable in Cycles X

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

M	intern/cycles/render/film.cpp
M	intern/cycles/render/tile.cpp

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

diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp
index 05b511c9b25..6af8187ce3d 100644
--- a/intern/cycles/render/film.cpp
+++ b/intern/cycles/render/film.cpp
@@ -508,7 +508,7 @@ void Film::update_passes(Scene *scene, bool add_sample_count_pass)
 
   const vector<Pass *> passes_immutable = scene->passes;
   for (const Pass *pass : passes_immutable) {
-    const PassInfo &info = pass->get_info();
+    const PassInfo info = pass->get_info();
     /* Add utility passes needed to generate some light passes. */
     if (info.divide_type != PASS_NONE) {
       add_auto_pass(scene, info.divide_type);
diff --git a/intern/cycles/render/tile.cpp b/intern/cycles/render/tile.cpp
index 4cfa97e8be0..079dd745a0b 100644
--- a/intern/cycles/render/tile.cpp
+++ b/intern/cycles/render/tile.cpp
@@ -53,7 +53,7 @@ static std::vector<std::string> exr_channel_names_for_passes(const vector<Pass *
       continue;
     }
 
-    const PassInfo &pass_info = pass->get_info();
+    const PassInfo pass_info = pass->get_info();
     num_channels += pass_info.num_components;
 
     /* EXR canonically expects first part of channel names to be sorted alphabetically, which is



More information about the Bf-blender-cvs mailing list