Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-01-25 18:20:10 +0300
committerJacques Lucke <jacques@blender.org>2021-01-25 18:25:27 +0300
commit8a77019474c1a4d05fb74bb86031ff75c116f751 (patch)
treeeadbdb78821f1aedb8d2829d583243dd1114bc4f /intern/cycles/blender/blender_volume.cpp
parent04f91bce53bd50fc492130ada8869f97ae205f9a (diff)
Cycles: modernize usage of rna iterators
Using rna iterators in range-based for loops is possible since {rBc4286ddb095d32714c9d5f10751a14f5871b3844}. This patch only updates the places that are easy to update without more changes in surrounding code. Differential Revision: https://developer.blender.org/D10195
Diffstat (limited to 'intern/cycles/blender/blender_volume.cpp')
-rw-r--r--intern/cycles/blender/blender_volume.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/intern/cycles/blender/blender_volume.cpp b/intern/cycles/blender/blender_volume.cpp
index 094d4bbc08c..410f7a72cf5 100644
--- a/intern/cycles/blender/blender_volume.cpp
+++ b/intern/cycles/blender/blender_volume.cpp
@@ -222,9 +222,7 @@ class BlenderVolumeLoader : public VDBImageLoader {
b_volume.grids.load(b_data.ptr.data);
#ifdef WITH_OPENVDB
- BL::Volume::grids_iterator b_grid_iter;
- for (b_volume.grids.begin(b_grid_iter); b_grid_iter != b_volume.grids.end(); ++b_grid_iter) {
- BL::VolumeGrid b_volume_grid(*b_grid_iter);
+ for (BL::VolumeGrid &b_volume_grid : b_volume.grids) {
if (b_volume_grid.name() == grid_name) {
const bool unload = !b_volume_grid.is_loaded();
@@ -260,9 +258,7 @@ static void sync_volume_object(BL::BlendData &b_data,
volume->set_object_space((b_render.space() == BL::VolumeRender::space_OBJECT));
/* Find grid with matching name. */
- BL::Volume::grids_iterator b_grid_iter;
- for (b_volume.grids.begin(b_grid_iter); b_grid_iter != b_volume.grids.end(); ++b_grid_iter) {
- BL::VolumeGrid b_grid = *b_grid_iter;
+ for (BL::VolumeGrid &b_grid : b_volume.grids) {
ustring name = ustring(b_grid.name());
AttributeStandard std = ATTR_STD_NONE;