From 169dff19d4da8d76e69b8e896aa25b0013639c03 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Wed, 2 Jan 2019 10:41:30 +0100 Subject: modernize loops --- src/extension/internal/pov-out.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/extension/internal/pov-out.cpp') diff --git a/src/extension/internal/pov-out.cpp b/src/extension/internal/pov-out.cpp index 7ee8cd235..1b298882b 100644 --- a/src/extension/internal/pov-out.cpp +++ b/src/extension/internal/pov-out.cpp @@ -522,12 +522,12 @@ bool PovOutput::doTree(SPDocument *doc) out("#end\n"); out("\n\n"); out("#declare %s = union {\n", id.c_str()); - for (unsigned i = 0 ; i < povShapes.size() ; i++) + for (auto & povShape : povShapes) { - out(" object { %s\n", povShapes[i].id.c_str()); + out(" object { %s\n", povShape.id.c_str()); out(" texture { \n"); - if (povShapes[i].color.length()>0) - out(" pigment { %s }\n", povShapes[i].color.c_str()); + if (povShape.color.length()>0) + out(" pigment { %s }\n", povShape.color.c_str()); else out(" pigment { rgb <0,0,0> }\n"); out(" finish { %s_Finish }\n", pfx); @@ -551,12 +551,12 @@ bool PovOutput::doTree(SPDocument *doc) out("\n\n"); out("#declare %s_Z = union {\n", pfx); - for (unsigned i = 0 ; i < povShapes.size() ; i++) + for (auto & povShape : povShapes) { - out(" object { %s\n", povShapes[i].id.c_str()); + out(" object { %s\n", povShape.id.c_str()); out(" texture { \n"); - if (povShapes[i].color.length()>0) - out(" pigment { %s }\n", povShapes[i].color.c_str()); + if (povShape.color.length()>0) + out(" pigment { %s }\n", povShape.color.c_str()); else out(" pigment { rgb <0,0,0> }\n"); out(" finish { %s_Finish }\n", pfx); -- cgit v1.2.3