mapbox-gl-native icon indicating copy to clipboard operation
mapbox-gl-native copied to clipboard

Fix narrowing conversion warning/error

Open Thra11 opened this issue 2 years ago • 1 comments

Launch Checklist

PointAndCameraDistance is std::pair<Point<float>,float>. vec4 is std::array<double, 4>. Implicitly converting double to float generates warnings (or errors if -Werror=narrowing is set). This pull request avoids the warning by explicitly casting the double to a float.

  • [x] briefly describe the changes in this PR
  • [ ] include before/after visuals or gifs if this PR includes visual changes
  • [ ] write tests for all new functionality
  • [ ] document any changes to public APIs
  • [ ] tagged @mapbox/maps-android @mapbox/maps-ios @mapbox/core-sdk if this PR adds or updates a public API
  • [ ] tagged @mapbox/gl-js if this PR includes shader changes or needs a js port
  • [ ] apply needs changelog label if a changelog is needed (remove label when added)

Thra11 avatar May 09 '23 22:05 Thra11

Fixes #16522

Thra11 avatar May 09 '23 22:05 Thra11