Skip to content

cpp: Fix clang-tidy compile warning for kPairPrecisionInverse#753

Open
willbeason wants to merge 1 commit intogoogle:mainfrom
willbeason:perf-cpp
Open

cpp: Fix clang-tidy compile warning for kPairPrecisionInverse#753
willbeason wants to merge 1 commit intogoogle:mainfrom
willbeason:perf-cpp

Conversation

@willbeason
Copy link
Contributor

It looks like kPairPrecisionInverse was incorrectly marked size_t (which is unsigned) instead of int64_t, like kGridLatPrecisionInverse. This caused an implicit conversion from unsigned to signed, which clang_tidy warned about on compilation.

I've changed it to int64_t, which does resolve the warning.

Fix warning about using deprecated float.h in favor of cfloat.

Update cpp/README.md to instruct to use bash and not sh, as clang_check.sh cannot be run by sh (it returns a parsing error).

Add **/.clwb/ dir to .gitignore. CLion uses it for storing project metadata for linking to bazel.

It looks like kPairPrecisionInverse was incorrectly marked size_t (which is unsigned) instead of int64_t, like kGridLatPrecisionInverse. This caused an implicit conversion from unsigned to signed, which clang_tidy warned about on compilation.

I've changed it to int64_t, which does resolve the warning.
@willbeason willbeason changed the title Fix clang-tidy compile warning for kPairPrecisionInverse cpp: Fix clang-tidy compile warning for kPairPrecisionInverse Mar 9, 2026
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.

1 participant