Skip to content

Commit c06c80e

Browse files
committed
osgAnimation/Keyframe: Fix -Wshadow warning
``` include/osgAnimation/Keyframe:108:53: warning: declaration of 'iterator' shadows a member of 'osgAnimation::TemplateKeyframeContainer<osgAnimation::TemplateCubicBezier<double> >' [-Wshadow] 108 | for(std::vector<unsigned int>::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; | ^~~~~~~~ ```
1 parent 40bddd8 commit c06c80e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

include/osgAnimation/Keyframe

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ namespace osgAnimation
105105
// 2. build deduplicated list of keyframes
106106
unsigned int cumul = 0;
107107
VectorType deduplicated;
108-
for(std::vector<unsigned int>::iterator iterator = intervalSizes.begin() ; iterator != intervalSizes.end() ; ++ iterator) {
108+
for(std::vector<unsigned int>::iterator it = intervalSizes.begin() ; it != intervalSizes.end() ; ++ it) {
109109
deduplicated.push_back((*this)[cumul]);
110-
if(*iterator > 1) {
111-
deduplicated.push_back((*this)[cumul + (*iterator) - 1]);
110+
if(*it > 1) {
111+
deduplicated.push_back((*this)[cumul + (*it) - 1]);
112112
}
113-
cumul += *iterator;
113+
cumul += *it;
114114
}
115115

116116
unsigned int count = size() - deduplicated.size();

0 commit comments

Comments
 (0)