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

clangtidy warnings about narrowing in persistent classes #118

Open
brownd1978 opened this issue Apr 13, 2024 · 2 comments
Open

clangtidy warnings about narrowing in persistent classes #118

brownd1978 opened this issue Apr 13, 2024 · 2 comments

Comments

@brownd1978
Copy link

clangtidy gives warnings about narrowing when constructing persistent classes (ie in *DataProducts constructors). Those narrowings are conscious choices to reduce persistent payload. Can we turn off those warnings?

narrowing conversion from 'double' to 'float' [cppcoreguidelines-narrowing-conversions]

@brownd1978 brownd1978 changed the title clangtidy flags narrowing in persistent classes clangtidy warnings about narrowing in persistent classes Apr 13, 2024
@rlcee
Copy link
Collaborator

rlcee commented Apr 13, 2024

clangy-tidy wants you to write myfloat = float(mydouble), so declaring the narrowing was intentional. If you don't like that, do you want the warning turned off globally, for the three *Products directories, or by file or instance (which would be very tedious)?

@brownd1978
Copy link
Author

I don't see much value in this test in this *Products directory, if it could be turned off that would be good. We can also just update to make the explicit casts, its just tedious.

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

No branches or pull requests

2 participants