Closed ksgustafson closed 6 years ago
It appears that the expression should have been `atoms[firstClearPos-1] == 0' .
I have changed the master and devel branches to reflect this. I recommend doing "git checkout Cell.cpp" to revert your change (which was not correct) and then pull a new version.
What compiler were you using? This error wasn't flagged by gnu g++ compiler or the Mac clang compiler.
Rationale: firstClearPos is the index of the first element in a contiguous block of empty elements of the array Atom* atoms[MaxAtomCell]. Empty elements in this array have 0 values, while non-empty elements contain valid pointers to Atom objects. If firstClearPos > 0 and atoms[firstClearPos-1] == 0 (i.e., is empty), then firstClearPos isn't the first empty element in the block, indicating an error.
Great thanks!
I am using Apple LLVM version 9.0.0 (clang-900.0.38).
I am getting the following error after running 'make mcMd':
g++ -O3 -ffast-math -Wall --std=c++98 -Winline -I/Users/gust/simpatico/src -DSIMPBOND -c -o /Users/gust/simpatico/bld/serial/mcMd/neighbor/Cell.o /Users/gust/simpatico/src/mcMd/neighbor/Cell.cpp /Users/gust/simpatico/src/mcMd/neighbor/Cell.cpp:68:58: error: ordered comparison between pointer and zero ('McMd::Atom *' and 'int') if (firstClearPos > 0 && atoms[firstClearPos-1] < 0) {