-
Notifications
You must be signed in to change notification settings - Fork 370
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 minor integer type mismatches #3133
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! As a related question, would we be interested in applying type/tidiness suggestions (e.g. "can be made const", "can be made static") to all files? Some IDEs conveniently provide the feature to analyze all files in a scope and they should be safe.
While this is a good idea, it is preferable to find some tools which can be invoked from the CI pipeline so that the code-refactoring would be a continuous process and also applies to new code rather than just a one-time thing for the current codebase. |
Could you open an issue in which you mention the mess? It would be great if we would collect a list of potential refactorings that one could collectively do at some point, or ideally use these as a test case for automated refactoring tools (e.g. clang-tidy). |
I definitely agree that we could use that for CI, though might not have to be mutually exclusive. A lot of the IDE & static analysis tools go beyond clang-tidy, though it'd probably be best to have a session and go over some of that output together at some point since not every refactor is safe but may very well cut down build or even runtime (missing constexprs, unused imports, redundant checks etc) |
This PR fixes some warnings by GCC 12.3 about integer type mismatches.
Note that we have a bit of a mess between
int
(e.g.,MPIManager::num_processes_
) andsize_t
(e.g., return type ofMPIManager::get_num_processes()
), but cleaning that up is for another day.