-
Notifications
You must be signed in to change notification settings - Fork 11
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
Be more careful about signed/unsigned comparisons #335
Labels
Comments
terrillmoore
added a commit
that referenced
this issue
Jun 12, 2022
We had lots of errors due to our normal range checking; GCC doesn't like when we say `if (0 <= v && v <= max)` if `v` is unsigned. The more verbose way of getting the same effect is to add static asserts using `std::numeric_limits()`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gcc
-Wall
complains about signed/unsigned comparisons. It doesn't hurt to fix these. It requires some verbosity, but isn't generally difficult, and it makes the code more proof-like. This ticket tracks those changes.The text was updated successfully, but these errors were encountered: