Fixes for clang-tidy-9
authorMark Abraham <mark.j.abraham@gmail.com>
Thu, 19 Mar 2020 08:42:47 +0000 (09:42 +0100)
committerM. Eric Irrgang <mei2n@virginia.edu>
Wed, 8 Apr 2020 17:37:43 +0000 (17:37 +0000)
commitb40144642658a2c8fb37d27163b26715bf846fb5
treef766df9c54377564c1c2a70c57bb964a20114855
parent7325cb2870ada30b5cbb6d3e8264d5449df04931
Fixes for clang-tidy-9

Mostly suggestions for risky repeat branches and more readable use of
methods that use no member variables and could be static.  This means
that some bad, incompletely implemented, or excessively implemented
code is now gone or uglier than it was before.

The CPU-build classes for GPU management objects didn't use the only
member variable impl_, so they were also recommended to become
static. That doesn't work for our use case, but swapping the assertion
to be !impl_ does all jobs well enough.

eg2cHartree_e probably has had the wrong behavior ever since it
was introduced, but I don't know and it's not a big problem.

LJ12 Encad table is probably fixed, but it's unused, so who cares.
98 files changed:
src/.clang-tidy
src/gromacs/analysisdata/datamodulemanager.cpp
src/gromacs/analysisdata/tests/datatest.h
src/gromacs/applied_forces/tests/densityfittingoptions.cpp
src/gromacs/applied_forces/tests/electricfield.cpp
src/gromacs/awh/biasparams.cpp
src/gromacs/commandline/cmdlinemodulemanager.cpp
src/gromacs/commandline/cmdlineparser.cpp
src/gromacs/coordinateio/outputadapters/setatoms.cpp
src/gromacs/coordinateio/outputadapters/setatoms.h
src/gromacs/coordinateio/tests/requirements.h
src/gromacs/correlationfunctions/tests/autocorr.cpp
src/gromacs/domdec/gpuhaloexchange_impl.cpp
src/gromacs/ewald/pme_coordinate_receiver_gpu_impl.cpp
src/gromacs/ewald/pme_force_sender_gpu_impl.cpp
src/gromacs/ewald/pme_pp_comm_gpu_impl.cpp
src/gromacs/fileio/checkpoint.cpp
src/gromacs/fileio/pdbio.cpp
src/gromacs/fileio/tests/xvgio.cpp
src/gromacs/fileio/tpxio.cpp
src/gromacs/fileio/xvgr.cpp
src/gromacs/gmxana/anadih.cpp
src/gromacs/gmxana/dlist.cpp
src/gromacs/gmxana/gmx_angle.cpp
src/gromacs/gmxana/gmx_do_dssp.cpp
src/gromacs/gmxpreprocess/gen_ad.cpp
src/gromacs/gmxpreprocess/grompp.cpp
src/gromacs/gmxpreprocess/nm2type.cpp
src/gromacs/gmxpreprocess/pdb2top.cpp
src/gromacs/gmxpreprocess/topio.cpp
src/gromacs/gmxpreprocess/toputil.cpp
src/gromacs/gpu_utils/device_stream.cpp
src/gromacs/gpu_utils/hostallocator.h
src/gromacs/gpu_utils/tests/device_stream_manager.cpp
src/gromacs/listed_forces/gpubonded_impl.cpp
src/gromacs/math/densityfit.cpp
src/gromacs/math/multidimarray.h
src/gromacs/math/units.cpp
src/gromacs/mdlib/energyoutput.h
src/gromacs/mdlib/mdebin_bar.cpp
src/gromacs/mdlib/tests/constr.cpp
src/gromacs/mdlib/tests/leapfrog.cpp
src/gromacs/mdlib/tests/settle.cpp
src/gromacs/mdlib/tests/shake.cpp
src/gromacs/mdlib/update_constrain_gpu_impl.cpp
src/gromacs/mdlib/updategroups.cpp
src/gromacs/mdlib/vcm.cpp
src/gromacs/mdrun/md.cpp
src/gromacs/mdrun/mimic.cpp
src/gromacs/mdrun/minimize.cpp
src/gromacs/mdrun/rerun.cpp
src/gromacs/mdrun/runner.cpp
src/gromacs/mdrunutility/tests/threadaffinity_mpi.cpp
src/gromacs/mdrunutility/tests/threadaffinitytest.h
src/gromacs/mdtypes/inputrec.cpp
src/gromacs/mdtypes/inputrec.h
src/gromacs/mdtypes/state_propagator_data_gpu_impl.cpp
src/gromacs/mimic/communicator.cpp
src/gromacs/mimic/communicator.h
src/gromacs/options/filenameoptionmanager.cpp
src/gromacs/options/tests/treesupport.cpp
src/gromacs/pulling/pull_rotation.cpp
src/gromacs/pulling/tests/pull.cpp
src/gromacs/restraint/restraintmdmodule.cpp
src/gromacs/restraint/restraintmdmodule_impl.h
src/gromacs/selection/compiler.cpp
src/gromacs/selection/compiler.h
src/gromacs/selection/evaluate.cpp
src/gromacs/selection/poscalc.cpp
src/gromacs/selection/scanner_internal.cpp
src/gromacs/selection/selectioncollection.cpp
src/gromacs/selection/selectioncollection.h
src/gromacs/selection/selectioncollection_impl.h
src/gromacs/selection/selectionoptionbehavior.cpp
src/gromacs/selection/selhelp.cpp
src/gromacs/selection/tests/nbsearch.cpp
src/gromacs/selection/tests/poscalc.cpp
src/gromacs/simd/tests/simd_math.cpp
src/gromacs/tables/forcetable.cpp
src/gromacs/taskassignment/taskassignment.h
src/gromacs/tools/mk_angndx.cpp
src/gromacs/tools/tests/dump.cpp
src/gromacs/trajectoryanalysis/analysismodule.cpp
src/gromacs/trajectoryanalysis/analysismodule.h
src/gromacs/trajectoryanalysis/modules/angle.cpp
src/gromacs/trajectoryanalysis/modules/distance.cpp
src/gromacs/trajectoryanalysis/modules/freevolume.cpp
src/gromacs/trajectoryanalysis/modules/pairdist.cpp
src/gromacs/trajectoryanalysis/modules/rdf.cpp
src/gromacs/trajectoryanalysis/modules/sasa.cpp
src/gromacs/trajectoryanalysis/modules/select.cpp
src/gromacs/trajectoryanalysis/modules/trajectory.cpp
src/gromacs/utility/filestream.cpp
src/gromacs/utility/filestream.h
src/gromacs/utility/keyvaluetree.cpp
src/gromacs/utility/smalloc.h
src/gromacs/utility/tests/inmemoryserializer.cpp
src/gromacs/utility/tests/keyvaluetreeserializer.cpp