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 compile error with clang #580

Merged
merged 2 commits into from
Jul 25, 2024
Merged

Fix compile error with clang #580

merged 2 commits into from
Jul 25, 2024

Conversation

nicolaslauzon
Copy link

Description

Summary:

My build was failing with clang 18.1.3

 error: non-constant-expression cannot be narrowed from type 'double' to 'ScalarType' (aka 'float') in initializer list [-Wc++11-narrowing]
  173 |         const ScalarType radiusSample{ radius * sqrt(uniformDistribution(randomNumberGenerator)) };

By inserting a static_cast it fixed it

@nicolaslauzon nicolaslauzon marked this pull request as ready for review July 24, 2024 12:32
Copy link

sonarcloud bot commented Jul 24, 2024

@boxanm boxanm merged commit f621555 into develop Jul 25, 2024
6 checks passed
@boxanm boxanm deleted the silence-compile-error-clang branch July 25, 2024 14:08
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.

3 participants