Skip to content

Modernize the codebase - and, or, not#2498

Merged
jougs merged 13 commits intonest:masterfrom
JanVogelsang:refactoring-and-or-not
Oct 19, 2022
Merged

Modernize the codebase - and, or, not#2498
jougs merged 13 commits intonest:masterfrom
JanVogelsang:refactoring-and-or-not

Conversation

@JanVogelsang
Copy link
Contributor

In this PR all occurrences of &&, || and ! are changed to and, or and not respectively.

Additionally, all redundant parentheses around boolean expressions are removed.

e.g.: if ( ( a == 1 ) && ( b == 2 ) ) was changed to if ( a == 1 and b == 2 )

@JanVogelsang
Copy link
Contributor Author

Unfortunately, two of the checks do not pass yet, because of some SLI regression test failing. I went over every single of my changes in this PR multiple times now and could not find any change that would actually change the compiled code in any way. All changes are purely style-based. Either I am missing something, or there is some reason related to SLI that I am not aware of, that causes the checks to fail. Could someone assist me here?

@heplesser
Copy link
Contributor

@JanVogelsang I can at least explain why only two of the tests fail: The passing ones include MPI, and the test is skipped for MPI (for technical reasons). Can you reproduce the test failure on your computer if you build without MPI?

@JanVogelsang
Copy link
Contributor Author

I can reproduce the failing tests on my computer without building with MPI. Same error

Copy link
Contributor

@heplesser heplesser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I found the error, see suggestion.

@JanVogelsang JanVogelsang marked this pull request as ready for review October 13, 2022 19:48
Copy link
Contributor

@jougs jougs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the replacement of the operators is unproblematic here. I still have a bunch of other comments regarding the statements in the lines that change. Most of my comments also apply to other places in the code in addition to the ones I have marked.

Copy link
Contributor

@jougs jougs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this. It is really much appreciated :-)

JanVogelsang and others added 2 commits October 19, 2022 11:20
@jougs jougs merged commit 7bdb996 into nest:master Oct 19, 2022
@jougs jougs changed the title Modernizing the codebase - and, or, not Modernize the codebase - and, or, not Oct 19, 2022
@jougs jougs added S: Normal Handle this with default priority T: Maintenance Work to keep up the quality of the code and documentation. I: Internal API Changes were introduced in basic internal workings of the simulator that developers need to know labels Oct 19, 2022
@JanVogelsang JanVogelsang deleted the refactoring-and-or-not branch November 29, 2022 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

I: Internal API Changes were introduced in basic internal workings of the simulator that developers need to know S: Normal Handle this with default priority T: Maintenance Work to keep up the quality of the code and documentation.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants

Comments