Skip to content

osgAnimation/Keyframe: Fix -Wshadow warning#1029

Merged
robertosfield merged 1 commit intoopenscenegraph:masterfrom
glebm:fix-shadow-warning
Jan 18, 2021
Merged

osgAnimation/Keyframe: Fix -Wshadow warning#1029
robertosfield merged 1 commit intoopenscenegraph:masterfrom
glebm:fix-shadow-warning

Conversation

@glebm
Copy link
Copy Markdown
Contributor

@glebm glebm commented Jan 15, 2021

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;
      |                                            ^~~~~~~~

Please also cherry-pick into 3.6 when merging

```
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;
      |                                            ^~~~~~~~
```
@robertosfield robertosfield merged commit a7360d6 into openscenegraph:master Jan 18, 2021
@robertosfield
Copy link
Copy Markdown
Collaborator

Thanks merged with master and 3.6 branch

@glebm glebm deleted the fix-shadow-warning branch January 18, 2021 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants