Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a warning about an enumeration value not being handled in a switch statement #84

Merged
merged 1 commit into from
May 25, 2021
Merged

Fix a warning about an enumeration value not being handled in a switch statement #84

merged 1 commit into from
May 25, 2021

Conversation

nasso
Copy link
Contributor

@nasso nasso commented May 17, 2021

Accessor::ComponentType::None was not explicitly handled by the switch statement in fx::gltf::detail::WriteAccessorMinMax(nlohmann::json&, Accessor const&) (at include/fx/gltf.h:1318).

This caused a warning on some compilers with the right flags. Here's an example with GCC 10:

/[...]/include/fx/gltf.h:1318:20: warning: enumeration value ‘None’ not handled in switch [-Wswitch]
 1318 |             switch (accessor.componentType)
      |                    ^

This PR addresses this by explicitly ignoring the missing value, keeping the old behaviour while silencing the warning.

@jessey-git jessey-git merged commit c708f03 into jessey-git:master May 25, 2021
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