[Bf-blender-cvs] [e49721d3eda] soc-2020-production-ready-light-tree: Removed VLA's leftover from the 2018 GSoC project.

Sam Kottler noreply at git.blender.org
Tue Jun 9 16:50:08 CEST 2020


Commit: e49721d3edac5632374df76158da20ccd37a9f2e
Author: Sam Kottler
Date:   Tue Jun 9 08:49:49 2020 -0600
Branches: soc-2020-production-ready-light-tree
https://developer.blender.org/rBe49721d3edac5632374df76158da20ccd37a9f2e

Removed VLA's leftover from the 2018 GSoC project.

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

M	intern/cycles/render/light_tree.cpp

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

diff --git a/intern/cycles/render/light_tree.cpp b/intern/cycles/render/light_tree.cpp
index 17d9a1bb8f2..8f60b9097ab 100644
--- a/intern/cycles/render/light_tree.cpp
+++ b/intern/cycles/render/light_tree.cpp
@@ -395,8 +395,8 @@ void LightTree::split_saoh(const BoundBox &centroid_bbox,
   const float extent_max = max3(centroid_bbox.size());
   for (int dim = 0; dim < 3; ++dim) {
 
-    BucketInfo buckets[num_buckets];
-    vector<Orientation> bucket_bcones[num_buckets];
+    vector<BucketInfo> buckets(num_buckets);
+    vector<vector<Orientation>> bucket_bcones(num_buckets);
 
     /* calculate total energy in each bucket and a bbox of it */
     const float extent = centroid_bbox.max[dim] - centroid_bbox.min[dim];
@@ -423,7 +423,7 @@ void LightTree::split_saoh(const BoundBox &centroid_bbox,
     }
 
     /* compute costs for splitting at bucket boundaries */
-    float cost[num_buckets - 1];
+    vector<float> cost(num_buckets - 1);
     BoundBox bbox_L, bbox_R;
     float energy_L, energy_R;
     vector<Orientation> bcones_L, bcones_R;



More information about the Bf-blender-cvs mailing list