cpp: Fix clang-tidy compile warning for kPairPrecisionInverse#753
Open
willbeason wants to merge 1 commit intogoogle:mainfrom
Open
cpp: Fix clang-tidy compile warning for kPairPrecisionInverse#753willbeason wants to merge 1 commit intogoogle:mainfrom
willbeason wants to merge 1 commit intogoogle:mainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.