Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Fix narrowing conversion warning/error #16666

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Thra11
Copy link

@Thra11 Thra11 commented May 9, 2023

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.

  • 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 Thra11 requested a review from a team as a code owner May 9, 2023 22:43
@Thra11
Copy link
Author

Thra11 commented May 9, 2023

Fixes #16522

Thra11 added a commit to Thra11/nixpkgs that referenced this pull request May 9, 2023
Thra11 added a commit to Thra11/nixpkgs that referenced this pull request May 9, 2023
colemickens pushed a commit to colemickens/nixpkgs that referenced this pull request May 12, 2023
colemickens pushed a commit to colemickens/nixpkgs that referenced this pull request May 13, 2023
github-actions bot pushed a commit to Mic92/nixpkgs that referenced this pull request May 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants