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;
      |                                            ^~~~~~~~
```
This commit is contained in:
Gleb Mazovetskiy 2021-01-15 17:55:33 +00:00 committed by Robert Osfield
parent 44d3da02a9
commit b4663ded94

View File

@ -105,12 +105,12 @@ namespace osgAnimation
// 2. build deduplicated list of keyframes
unsigned int cumul = 0;
VectorType deduplicated;
for(std::vector<unsigned int>::iterator iterator = intervalSizes.begin() ; iterator != intervalSizes.end() ; ++ iterator) {
for(std::vector<unsigned int>::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();