-
Notifications
You must be signed in to change notification settings - Fork 15
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
Code cleanup (using namespace std) #260
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.
CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
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.
Overall looks good to me, but the using Logger
thing is again weird. Do we have bleedthrough of that too, or do we not need that in files where we already have #include utils/Logger.h"
?
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.
I carefully approve but would like to have a second opinion before merging. @amartyads
I also tentatively approve from my side |
Description
This PR deletes all
using namespace std;
. Therefore,std::
functions (e.g.,string
,array
,map
, ...) had to be declared explicitly.Check the changes with the following bash commands:
Deleted in
src
:git diff --word-diff=porcelain --word-diff-regex=. origin/master HEAD src | grep "^-" | grep -v "\-\-\-" | sort | uniq -c
Added in
src
:git diff --word-diff=porcelain --word-diff-regex=. origin/master HEAD src | grep "^+" | grep -v "+++" | sort | uniq -c
Replace
src
withtools
to get the same output for the tools folder. Omit it for changes in the whole project.Most of the "weird" strings like
ng
,f
orif (isnan
arise from line 1258 in Simulation.cpp.This PR also adds some static code analysis to prevent the usage ofusing namespace std;
in the future.Related Pull Requests
Resolved Issues
How Has This Been Tested?
Some check scripts where added which build the code with different options (but not combined). All runs succeeded.
Open issues:
FMM_FFT
,QUICKSCHED
(maybe set indirectly?) andWITH_PAPI
using Log
is used multiple times -> solved in discussion (see below)