Fix return values of frame-reading functions
authorMark Abraham <mark.j.abraham@gmail.com>
Thu, 14 Dec 2017 03:04:13 +0000 (14:04 +1100)
committerErik Lindahl <erik.lindahl@gmail.com>
Thu, 14 Dec 2017 12:11:01 +0000 (13:11 +0100)
commitc67aef95e0c9bd50d85615d7177b423f24bdf489
tree7447ecbe8a8d6e676673f42d086edc2ba696a8e0
parent5c453f8c99344dbab63b89edd5ab823b9851f0ec
Fix return values of frame-reading functions

This function was based on read_first_x that returned the number of
atoms, and was documented to do the same, but has always returned a
logical boolean about whether a frame has been read. This led to
aspects of gmx spatial and gmx trjcat -demux being broken.

Fixed by returning a proper bool, and fixing the remaining logic that
used the return value in a non-boolean sense.

Refs #2157

Change-Id: Ic871b56f68c7dbc654ab11b34ff82932353e6ceb
src/gromacs/fileio/trxio.cpp
src/gromacs/fileio/trxio.h
src/gromacs/gmxana/gmx_trjcat.cpp