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

Remove using namespace and while(1) #245

Merged
merged 2 commits into from Feb 7, 2023

Conversation

bcaddy
Copy link
Collaborator

@bcaddy bcaddy commented Feb 3, 2023

  • Remove all instances of using namespace and add proper namespace qualifiers to statements
    • Allows us to turn on google-build-using-namespace clang-tidy check
  • Replace while(1) with while(true)
    • Allows us to turn on modernize-use-bool-literals clang-tidy check
  • Permanantly disable misc-unused-parameters clang-tidy check since it causes too many issues with all our ifdefs

Close #233

@alwinm
Copy link
Collaborator

alwinm commented Feb 5, 2023

Just copy-pasting the error log here:

/__w/cholla/cholla/src/particles/particles_boundaries_gpu.cu:84:19: error: converting integer literal to bool, use bool literal instead [modernize-use-bool-literals,-warnings-as-errors]
  bool transfer = 0;
                  ^
                  false
/__w/cholla/cholla/src/particles/particles_boundaries_gpu.cu:88:44: error: converting integer literal to bool, use bool literal instead [modernize-use-bool-literals,-warnings-as-errors]
  if (side == 0 && pos < d_min) transfer = 1;
                                           ^
                                           true
/__w/cholla/cholla/src/particles/particles_boundaries_gpu.cu:89:45: error: converting integer literal to bool, use bool literal instead [modernize-use-bool-literals,-warnings-as-errors]
  if (side == 1 && pos >= d_max) transfer = 1;
                                            ^
                                            true

Looks like there were some non-hydro instances of modernize-use-bool-literals

- Remove all instances of `using namespace` and add proper namespace
  qualifiers to statements
  - Allows us to turn on `google-build-using-namespace` clang-tidy
    check
- Replace `while(1)` with `while(true)`
  - Allows us to turn on `modernize-use-bool-literals` clang-tidy check
- Permanantly disable `misc-unused-parameters` clang-tidy check since
  it causes too many issues with all our ifdefs
@bcaddy
Copy link
Collaborator Author

bcaddy commented Feb 6, 2023

This is ready for merging. Thanks to @alwinm for copying the error logs.

@evaneschneider evaneschneider merged commit 381cfc2 into cholla-hydro:dev Feb 7, 2023
@bcaddy bcaddy mentioned this pull request Feb 7, 2023
@bcaddy bcaddy deleted the dev-iss233 branch February 7, 2023 15:16
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.

None yet

3 participants