-
Notifications
You must be signed in to change notification settings - Fork 90
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
apply clang-format v15.0.7 and .clang-format@d8f14fdd #2662
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.
clang-tidy made some suggestions
I = 0.0; // I disappears from metric | ||
} | ||
} | ||
|
||
////////////////////////////////////////////////////////////// | ||
// NORMALISE QUANTITIES | ||
|
||
if (mesh->get(Bbar, "bmag")) // Typical magnetic field | ||
if (mesh->get(Bbar, "bmag")) { // Typical magnetic field |
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.
warning: implicit conversion 'int' -> bool [readability-implicit-bool-conversion]
if (mesh->get(Bbar, "bmag")) { // Typical magnetic field | |
if (mesh->get(Bbar, "bmag") != 0) { // Typical magnetic field |
Bbar = 1.0; | ||
if (mesh->get(Lbar, "rmag")) // Typical length scale | ||
} | ||
if (mesh->get(Lbar, "rmag")) { // Typical length scale |
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.
warning: implicit conversion 'int' -> bool [readability-implicit-bool-conversion]
if (mesh->get(Lbar, "rmag")) { // Typical length scale | |
if (mesh->get(Lbar, "rmag") != 0) { // Typical length scale |
@@ -661,8 +673,9 @@ | |||
//ddt(Vpar) = -0.5*Grad_parP(P + P0, CELL_YLOW); | |||
ddt(Vpar) = -0.5 * Grad_par_LtoC(P + P0); |
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.
warning: use of undeclared identifier 'Grad_par_LtoC' [clang-diagnostic-error]
ddt(Vpar) = -0.5 * Grad_par_LtoC(P + P0);
^
@@ -211,17 +214,19 @@ int main(int argc, char** argv) { | |||
int nx, ny; | |||
|
|||
double** Rxy = readMatrix(dataFile, "Rxy", nx, ny); | |||
if (!Rxy) | |||
if (!Rxy) { |
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.
warning: implicit conversion 'double **' -> bool [readability-implicit-bool-conversion]
if (!Rxy) { | |
if (Rxy == nullptr) { |
double** Zxy = readMatrix(dataFile, "Zxy", nx, ny); | ||
if (!Zxy) | ||
if (!Zxy) { |
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.
warning: implicit conversion 'double **' -> bool [readability-implicit-bool-conversion]
if (!Zxy) { | |
if (Zxy == nullptr) { |
In order to avoid merge-conflicts, I run clang-format to the whole code base, but I noticed this was not consistently done for next.
That is the code I used: