From c06c80ece45516464bfc934abcd3cc2d6cd89f38 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Fri, 15 Jan 2021 17:55:33 +0000 Subject: [PATCH] osgAnimation/Keyframe: Fix -Wshadow warning ``` include/osgAnimation/Keyframe:108:53: warning: declaration of 'iterator' shadows a member of 'osgAnimation::TemplateKeyframeContainer >' [-Wshadow] 108 | for(std::vector::iterator iterator = intervalSizes.begin() ; iterator != intervalSizes.end() ; ++ iterator) { | ^~~~~~~~ include/osg/MixinVector:39:44: note: shadowed declaration is here 39 | typedef typename vector_type::iterator iterator; | ^~~~~~~~ ``` --- include/osgAnimation/Keyframe | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/osgAnimation/Keyframe b/include/osgAnimation/Keyframe index 3e6142376..26aeff84a 100644 --- a/include/osgAnimation/Keyframe +++ b/include/osgAnimation/Keyframe @@ -105,12 +105,12 @@ namespace osgAnimation // 2. build deduplicated list of keyframes unsigned int cumul = 0; VectorType deduplicated; - for(std::vector::iterator iterator = intervalSizes.begin() ; iterator != intervalSizes.end() ; ++ iterator) { + for(std::vector::iterator it = intervalSizes.begin() ; it != intervalSizes.end() ; ++ it) { deduplicated.push_back((*this)[cumul]); - if(*iterator > 1) { - deduplicated.push_back((*this)[cumul + (*iterator) - 1]); + if(*it > 1) { + deduplicated.push_back((*this)[cumul + (*it) - 1]); } - cumul += *iterator; + cumul += *it; } unsigned int count = size() - deduplicated.size();