Skip to content

Commit

Permalink
Replace "|" with "||" in C++ file.
Browse files Browse the repository at this point in the history
  • Loading branch information
rklasky committed May 22, 2024
1 parent 987cd93 commit 71b27c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ecosim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ List rk4_run (List params, List instate, List forcing, List fishing, List stanza

// If biomass goes crazy or hits NA, exit loop with crash signal. Note it
// should still write the NA or INF values back to the output.
if ( any(is_na(cur_Biomass)) | any(is_infinite(cur_Biomass)) | any(is_nan(cur_Biomass)) ) {
if (bool(any(is_na(cur_Biomass))) || bool(any(is_infinite(cur_Biomass))) || bool(any(is_nan(cur_Biomass)))) {
CRASH_YEAR = y; y = EndYear; m = STEPS_PER_YEAR;
}

Expand Down Expand Up @@ -382,7 +382,7 @@ int y, m, dd;
// should still write the NA or INF values back to the output.
//NOJUV make sure crash tests work for juveniles.

if ( any(is_na(cur_Biomass)) | any(is_infinite(cur_Biomass)) | any(is_nan(cur_Biomass)) ) {
if (bool(any(is_na(cur_Biomass))) || bool(any(is_infinite(cur_Biomass))) || bool(any(is_nan(cur_Biomass)))) {
CRASH_YEAR = y; y = EndYear; m = STEPS_PER_YEAR;
}

Expand Down

0 comments on commit 71b27c9

Please sign in to comment.