clang-tidy modernize
authorRoland Schulz <roland.schulz@intel.com>
Wed, 18 Jul 2018 08:21:45 +0000 (01:21 -0700)
committerRoland Schulz <roland.schulz@intel.com>
Sat, 18 Aug 2018 08:34:07 +0000 (01:34 -0700)
avoid-bind (no changes)
redundant-void-arg
use-bool-literals

For deprecated-headers the changes are made in the cpp files but the
check isn't enabled. It isn't possible to enable it only for source
files but not header files and some of our headers still need to
compile with a C compiler for the nonbonded kernels. Once those
are removed the check should be enabled.

Change-Id: I7316b9bbffaf8842fecc40327543397984f75f5c

177 files changed:
src/.clang-tidy
src/gromacs/awh/awh.cpp
src/gromacs/awh/bias.cpp
src/gromacs/awh/biasstate.cpp
src/gromacs/awh/biaswriter.cpp
src/gromacs/awh/correlationhistory.cpp
src/gromacs/awh/correlationtensor.cpp
src/gromacs/awh/grid.cpp
src/gromacs/correlationfunctions/autocorr.cpp
src/gromacs/correlationfunctions/expfit.cpp
src/gromacs/correlationfunctions/integrate.cpp
src/gromacs/domdec/domdec.cpp
src/gromacs/domdec/domdec_constraints.cpp
src/gromacs/domdec/domdec_network.cpp
src/gromacs/domdec/domdec_setup.cpp
src/gromacs/domdec/domdec_specatomcomm.cpp
src/gromacs/domdec/domdec_topology.cpp
src/gromacs/domdec/domdec_vsite.cpp
src/gromacs/essentialdynamics/edsam.cpp
src/gromacs/ewald/ewald.cpp
src/gromacs/ewald/pme-load-balancing.cpp
src/gromacs/ewald/pme-only.cpp
src/gromacs/ewald/pme-pp.cpp
src/gromacs/ewald/pme-spread.cpp
src/gromacs/ewald/pme.cpp
src/gromacs/fft/fft.cpp
src/gromacs/fft/fft5d.cpp
src/gromacs/fft/fft_fftw3.cpp
src/gromacs/fft/parallel_3dfft.cpp
src/gromacs/fileio/gmxfio.cpp
src/gromacs/fileio/gmxfio.h
src/gromacs/fileio/libxdrf.cpp
src/gromacs/fileio/tpxio.cpp
src/gromacs/fileio/vmdio.cpp
src/gromacs/gmxana/gmx_awh.cpp
src/gromacs/gmxana/gmx_bar.cpp
src/gromacs/gmxana/gmx_densorder.cpp
src/gromacs/gmxana/gmx_disre.cpp
src/gromacs/gmxana/gmx_hbond.cpp
src/gromacs/gmxana/gmx_make_edi.cpp
src/gromacs/gmxana/gmx_msd.cpp
src/gromacs/gmxana/gmx_potential.cpp
src/gromacs/gmxana/gmx_trjconv.cpp
src/gromacs/gmxana/gmx_wham.cpp
src/gromacs/gmxlib/network.h
src/gromacs/gmxlib/nonbonded/nb_kernel_c/nb_kernel_allvsall.cpp
src/gromacs/gmxpreprocess/add_par.cpp
src/gromacs/gmxpreprocess/convparm.cpp
src/gromacs/gmxpreprocess/fflibutil.cpp
src/gromacs/gmxpreprocess/gen_ad.cpp
src/gromacs/gmxpreprocess/gen_vsite.cpp
src/gromacs/gmxpreprocess/genhydro.cpp
src/gromacs/gmxpreprocess/gmxcpp.cpp
src/gromacs/gmxpreprocess/gpp_atomtype.cpp
src/gromacs/gmxpreprocess/gpp_atomtype.h
src/gromacs/gmxpreprocess/gpp_bond_atomtype.cpp
src/gromacs/gmxpreprocess/gpp_bond_atomtype.h
src/gromacs/gmxpreprocess/gpp_nextnb.cpp
src/gromacs/gmxpreprocess/grompp.cpp
src/gromacs/gmxpreprocess/h_db.cpp
src/gromacs/gmxpreprocess/hackblock.cpp
src/gromacs/gmxpreprocess/hizzie.cpp
src/gromacs/gmxpreprocess/nm2type.cpp
src/gromacs/gmxpreprocess/pdb2gmx.cpp
src/gromacs/gmxpreprocess/pdb2top.cpp
src/gromacs/gmxpreprocess/pgutil.cpp
src/gromacs/gmxpreprocess/readir.cpp
src/gromacs/gmxpreprocess/readpull.cpp
src/gromacs/gmxpreprocess/resall.cpp
src/gromacs/gmxpreprocess/solvate.cpp
src/gromacs/gmxpreprocess/specbond.cpp
src/gromacs/gmxpreprocess/specbond.h
src/gromacs/gmxpreprocess/ter_db.cpp
src/gromacs/gmxpreprocess/tomorse.cpp
src/gromacs/gmxpreprocess/topdirs.cpp
src/gromacs/gmxpreprocess/topio.cpp
src/gromacs/gmxpreprocess/toppush.cpp
src/gromacs/gmxpreprocess/topshake.cpp
src/gromacs/gmxpreprocess/toputil.cpp
src/gromacs/gmxpreprocess/vsite_parm.cpp
src/gromacs/gmxpreprocess/xlate.cpp
src/gromacs/imd/imd.cpp
src/gromacs/imd/imdsocket.cpp
src/gromacs/listed-forces/listed-forces.cpp
src/gromacs/listed-forces/manage-threading.cpp
src/gromacs/listed-forces/position-restraints.cpp
src/gromacs/math/3dtransforms.cpp
src/gromacs/math/do_fit.cpp
src/gromacs/math/units.cpp
src/gromacs/math/utilities.cpp
src/gromacs/mdlib/broadcaststructs.cpp
src/gromacs/mdlib/calc_verletbuf.cpp
src/gromacs/mdlib/calcmu.cpp
src/gromacs/mdlib/compute_io.cpp
src/gromacs/mdlib/constr.cpp
src/gromacs/mdlib/coupling.cpp
src/gromacs/mdlib/ebin.cpp
src/gromacs/mdlib/ebin.h
src/gromacs/mdlib/expanded.cpp
src/gromacs/mdlib/force.cpp
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/forcerec.h
src/gromacs/mdlib/lincs.cpp
src/gromacs/mdlib/mdebin.cpp
src/gromacs/mdlib/mdebin_bar.cpp
src/gromacs/mdlib/membed.cpp
src/gromacs/mdlib/nbnxn_atomdata.cpp
src/gromacs/mdlib/nbnxn_grid.cpp
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.cpp
src/gromacs/mdlib/nbnxn_search.cpp
src/gromacs/mdlib/nbnxn_tuning.cpp
src/gromacs/mdlib/ns.cpp
src/gromacs/mdlib/nsgrid.cpp
src/gromacs/mdlib/qm_orca.cpp
src/gromacs/mdlib/qmmm.cpp
src/gromacs/mdlib/qmmm.h
src/gromacs/mdlib/rbin.cpp
src/gromacs/mdlib/rbin.h
src/gromacs/mdlib/settle.cpp
src/gromacs/mdlib/shellfc.cpp
src/gromacs/mdlib/sighandler.cpp
src/gromacs/mdlib/sighandler.h
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdlib/stat.cpp
src/gromacs/mdlib/update.cpp
src/gromacs/mdlib/vsite.cpp
src/gromacs/mdlib/wall.cpp
src/gromacs/mdlib/wnblist.cpp
src/gromacs/mdrun/md.cpp
src/gromacs/mdrunutility/handlerestart.cpp
src/gromacs/mdtypes/df_history.cpp
src/gromacs/pbcutil/mshift.cpp
src/gromacs/pbcutil/pbc.h
src/gromacs/pbcutil/rmpbc.cpp
src/gromacs/pulling/pull.cpp
src/gromacs/pulling/pull_rotation.cpp
src/gromacs/pulling/pullutil.cpp
src/gromacs/selection/compiler.cpp
src/gromacs/selection/evaluate.cpp
src/gromacs/selection/mempool.cpp
src/gromacs/selection/parser.h
src/gromacs/selection/parser.patch
src/gromacs/selection/parsetree.cpp
src/gromacs/selection/poscalc.cpp
src/gromacs/selection/position.cpp
src/gromacs/selection/regenerate_parser.sh
src/gromacs/selection/scanner_internal.cpp
src/gromacs/selection/selmethod.cpp
src/gromacs/selection/sm_same.cpp
src/gromacs/swap/swapcoords.cpp
src/gromacs/taskassignment/decidegpuusage.cpp
src/gromacs/taskassignment/resourcedivision.cpp
src/gromacs/timing/cyclecounter.h
src/gromacs/timing/wallcycle.cpp
src/gromacs/timing/wallcycle.h
src/gromacs/topology/atomprop.cpp
src/gromacs/topology/block.cpp
src/gromacs/topology/block.h
src/gromacs/topology/index.cpp
src/gromacs/topology/mtop_util.cpp
src/gromacs/topology/symtab.cpp
src/gromacs/topology/topsort.cpp
src/gromacs/trajectoryanalysis/modules/surfacearea.cpp
src/gromacs/trajectoryanalysis/runnercommon.cpp
src/gromacs/utility/basenetwork.cpp
src/gromacs/utility/baseversion.h
src/gromacs/utility/bitmask.h
src/gromacs/utility/compare.cpp
src/gromacs/utility/coolstuff.cpp
src/gromacs/utility/cstringutil.cpp
src/gromacs/utility/futil.cpp
src/gromacs/utility/futil.h
src/gromacs/utility/gmxomp.cpp
src/gromacs/utility/smalloc.cpp
src/gromacs/utility/stringutil.cpp
src/gromacs/utility/sysinfo.cpp
src/gromacs/utility/sysinfo.h

index 05659288012239eaa48b4c8b8c3bd16353b10a3f..95f603173a96b9870120b85a58636384b23b83d1 100644 (file)
@@ -4,6 +4,8 @@ Checks:  clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-security.insecureAP
          -readability-function-size,-readability-else-after-return,
          modernize-use-nullptr,modernize-use-emplace,
          modernize-make-unique,modernize-make-shared,
+         modernize-avoid-bind,
+         modernize-redundant-void-arg,modernize-use-bool-literals,
          cppcoreguidelines-*,-cppcoreguidelines-pro-*,-cppcoreguidelines-owning-memory,
          -cppcoreguidelines-no-malloc,-cppcoreguidelines-special-member-functions,
          google-*,-google-build-using-namespace,-google-explicit-constructor,
index 95bca480dd83976d537c03d26d9e0167ae63a3c5..c503de4e4889fa302483f18c2c1dfabf41d06dfe 100644 (file)
@@ -46,8 +46,7 @@
 
 #include "awh.h"
 
-#include <assert.h>
-
+#include <cassert>
 #include <cmath>
 #include <cstdio>
 #include <cstdlib>
index be165c0ca96bbefdec069526879d4b93314e622f..27167183d7aa5a658ba3a4a96a2938b5fb547efe 100644 (file)
@@ -46,8 +46,7 @@
 
 #include "bias.h"
 
-#include <assert.h>
-
+#include <cassert>
 #include <cmath>
 #include <cstdio>
 #include <cstdlib>
index 173f0956378e59ac3f7da324e849d685968488c6..633f045c746233132cf332847116c76033496223 100644 (file)
@@ -46,8 +46,7 @@
 
 #include "biasstate.h"
 
-#include <assert.h>
-
+#include <cassert>
 #include <cmath>
 #include <cstdio>
 #include <cstdlib>
index 57a635e03e8df40aedd4fad2c74853a43391ee30..cc45086a6e1dabf8be8f4b396c6921bd2aa7f6d4 100644 (file)
@@ -37,8 +37,7 @@
 
 #include "biaswriter.h"
 
-#include <assert.h>
-
+#include <cassert>
 #include <cmath>
 
 #include "gromacs/awh/awh.h"
index 18287c7ef11d207c18c0ec94e9c2268d36cea92c..47ecb44a27fea5cea9727affd7ac6dc43af9b34e 100644 (file)
@@ -47,7 +47,7 @@
 
 #include "correlationhistory.h"
 
-#include <assert.h>
+#include <cassert>
 
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/mdtypes/awh-correlation-history.h"
index f847e57a15454e12ab327382b084ccca51778baf..e1e973963a4d99b02701075cb2e3673f31fc2ee8 100644 (file)
@@ -46,7 +46,7 @@
 
 #include "correlationtensor.h"
 
-#include <assert.h>
+#include <cassert>
 
 #include "gromacs/math/functions.h"
 #include "gromacs/math/utilities.h"
index 2aae84c0c56e697e3092c5f8807eec2cf1903d38..243c1639c8669af3bcf9434db8c324b24a3befee 100644 (file)
@@ -46,8 +46,7 @@
 
 #include "grid.h"
 
-#include <assert.h>
-
+#include <cassert>
 #include <cmath>
 #include <cstring>
 
index 63560a924ae639de95fb8659cada326f7c78f3df..0f0a88ec2dfed1502f785fa81ec39a7dded28c8b 100644 (file)
 
 #include "autocorr.h"
 
-#include <stdio.h>
-#include <string.h>
-
 #include <cmath>
+#include <cstdio>
+#include <cstring>
 
 #include <algorithm>
 
index b8c3176c17aa379efe5ee101cba7aa2583f477ab..a1bfe445be6f1c9d1cc7ec0e82ffc9aa65197323 100644 (file)
@@ -46,7 +46,7 @@
 
 #include "expfit.h"
 
-#include <string.h>
+#include <cstring>
 
 #include <algorithm>
 
index 5bb256f6868e794d6b58dc2d19fb5406bb9e5ab5..1180469ea97815507c1f41df8af14ad086ebff25 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -43,9 +43,8 @@
 
 #include "integrate.h"
 
-#include <stdio.h>
-
 #include <cmath>
+#include <cstdio>
 
 #include "gromacs/math/functions.h"
 #include "gromacs/math/vec.h"
index 2f4ed89c1305c5771bcb80389d2b4b9367ebe3fd..58ce797fb5aac9d1b797c0a9c6c3f6cee9b3b768 100644 (file)
 
 #include "config.h"
 
-#include <assert.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cassert>
+#include <climits>
 #include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 
index 89d289ecbfa27d324569661401b20c50f9ecfd8e..92c32eff4ed5c426794ae4049e0f9506522b095b 100644 (file)
@@ -46,7 +46,7 @@
 
 #include "domdec_constraints.h"
 
-#include <assert.h>
+#include <cassert>
 
 #include <algorithm>
 
index 33d56bcc7dd9a288f44b1f768f57ffe9b9441a06..31bacdc185a6ce60f9006a144f008b3b9ed38a52 100644 (file)
@@ -48,7 +48,7 @@
 
 #include "config.h"
 
-#include <string.h>
+#include <cstring>
 
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/utility/gmxmpi.h"
index 91d74d3d096022029cf885919c8773217bb2ba43..e6766d9c8a5dc9a420b19085aa5209e1665a2586 100644 (file)
 
 #include "gmxpre.h"
 
-#include <assert.h>
-#include <stdio.h>
-
+#include <cassert>
 #include <cmath>
+#include <cstdio>
 
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/domdec/domdec_struct.h"
index 4dad4aa82cd157d19e82cd9e97cd9074c6cc0b54..8707dfd066ffcc8c4fa104d4dffdd487f4d3fee8 100644 (file)
@@ -46,7 +46,7 @@
 
 #include "domdec_specatomcomm.h"
 
-#include <assert.h>
+#include <cassert>
 
 #include <algorithm>
 
index 11c27fad03479574824b28559d8a683d5b3d5c74..79b9d00790db8501e7f8bfc68be1622beaca2a53 100644 (file)
 
 #include "gmxpre.h"
 
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include <cassert>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 #include <string>
index f0812f965c793284983c075c84d45c7e9b86e799..d2a31da4e6cee4aef614d90e1c01214e6e1873ae 100644 (file)
@@ -46,7 +46,7 @@
 
 #include "domdec_vsite.h"
 
-#include <assert.h>
+#include <cassert>
 
 #include <algorithm>
 
index f242839feb36f63fbde9ea3c1f359f2fbe3a2812..2eb01c63f1d0c97cba77e22c55f7f00ebd302793 100644 (file)
 
 #include "edsam.h"
 
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-
 #include <cmath>
+#include <cstdio>
+#include <cstring>
+#include <ctime>
 
 #include "gromacs/commandline/filenm.h"
 #include "gromacs/compat/make_unique.h"
index 92603997b3c9e193db5dce791bd093087b37bd62..696a47c9d38e7b77b1ddd8f6b6c22fcf342e6465 100644 (file)
@@ -49,9 +49,8 @@
 
 #include "ewald.h"
 
-#include <stdio.h>
-
 #include <cmath>
+#include <cstdio>
 #include <cstdlib>
 
 #include <algorithm>
index 971a47e3e522df1edf919d30fc1956cca2018eec..fbc46a11ff7e9cf60cf98c6399aad9f5496d1868 100644 (file)
@@ -45,8 +45,7 @@
 
 #include "pme-load-balancing.h"
 
-#include <assert.h>
-
+#include <cassert>
 #include <cmath>
 
 #include <algorithm>
index b3119b843ce76e8683d1ed15f35ecc4a21cf64be..84d49269ddc1473c0fad516325dfcd15d1cef01c 100644 (file)
 
 #include "config.h"
 
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cassert>
 #include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 #include <memory>
 #include <numeric>
index eaa7339ab794cfb314e5633ec8c2c86706bd8cc6..fcad69f0af1beb8cddbae0d7e9b817a6b90cbc38 100644 (file)
@@ -48,8 +48,7 @@
 
 #include "config.h"
 
-#include <stdio.h>
-
+#include <cstdio>
 #include <cstring>
 
 #include "gromacs/domdec/domdec.h"
index ff71c7fd87ce13a34e634b2db13d2402300ebe97..6ee5381967a77e66ac65be003cbe84a08e1b9123 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "config.h"
 
-#include <assert.h>
+#include <cassert>
 
 #include <algorithm>
 
index 5ca669b0bbd9e62b36e5fddc49e9ba0e2ac42126..f4433a432ed239abda962762c003e6e2ed224340 100644 (file)
 
 #include "config.h"
 
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cassert>
 #include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 #include <list>
index 53434e64534de854c7305b6fd2f2364af3cea7b2..849947d9df692bd8b47ee3218d09f74cfeaffea7 100644 (file)
@@ -2,7 +2,7 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 1991-2003 Erik Lindahl, David van der Spoel, University of Groningen.
- * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 
 #include "config.h"
 
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 #include "gromacs/math/gmxcomplex.h"
 #include "gromacs/utility/fatalerror.h"
index fa725120ba3c7a75dc5775a5b45017dc3b2e7a4f..3e0cb7857777ffbd7af8105123c4e509fd31fd59 100644 (file)
 
 #include "config.h"
 
-#include <assert.h>
-#include <float.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cassert>
+#include <cfloat>
 #include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 
index 4b741a379f06240b08b7aade0c08be9ce9ab05eb..155ca0dcfa740399de7a86d7f811a1b1767aa636 100644 (file)
@@ -37,8 +37,8 @@
 
 #include "config.h"
 
-#include <errno.h>
-#include <stdlib.h>
+#include <cerrno>
+#include <cstdlib>
 
 #include <fftw3.h>
 
index f32feca9a59ba972397c4872fc80f0c9465ec953..ed904312e682555c0209287a1142de4ef4ace9b0 100644 (file)
@@ -37,9 +37,9 @@
 
 #include "parallel_3dfft.h"
 
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cerrno>
+#include <cstdlib>
+#include <cstring>
 
 #include "gromacs/fft/fft.h"
 #include "gromacs/fft/fft5d.h"
index 190a521c2abcdec6c3cb82d565b8cc9ff04e30a8..4a2102df745122a2aa60b08fee9ef8fed15ca4b3 100644 (file)
@@ -115,7 +115,7 @@ void gmx_fio_unlock(t_fileio *fio)
 }
 
 /* make a dummy head element, assuming we locked everything. */
-static void gmx_fio_make_dummy(void)
+static void gmx_fio_make_dummy()
 {
     if (!open_files)
     {
@@ -197,7 +197,7 @@ static void gmx_fio_remove(t_fileio *fio)
 
 /* get the first open file, or NULL if there is none.
    Returns a locked fio. Assumes open_files_mutex is locked. */
-static t_fileio *gmx_fio_get_first(void)
+static t_fileio *gmx_fio_get_first()
 {
     t_fileio *ret;
 
@@ -685,7 +685,7 @@ int gmx_fio_fsync(t_fileio *fio)
 
 
 
-t_fileio *gmx_fio_all_output_fsync(void)
+t_fileio *gmx_fio_all_output_fsync()
 {
     t_fileio *ret = nullptr;
     t_fileio *cur;
index a94f7d86301a84011391dec37691a59e7550516d..9efc463c895ea7173081d172b04c073475dafa46 100644 (file)
@@ -153,7 +153,7 @@ struct gmx_file_position_t
  * we can truncate output files upon restart-with-appending. */
 std::vector<gmx_file_position_t> gmx_fio_get_output_file_positions();
 
-t_fileio *gmx_fio_all_output_fsync(void);
+t_fileio *gmx_fio_all_output_fsync();
 /* fsync all open output files. This is used for checkpointing, where
    we need to ensure that all output is actually written out to
    disk.
index a5e35d94e232b05380b10ec380e66a73dbdd2daf..c6be3354deb0ce4b9ef50a9c49dca1ace05e38ee 100644 (file)
@@ -1111,7 +1111,7 @@ xtc_get_next_frame_number(FILE *fp, XDR *xdrs, int natoms)
 
     /* read one int just to make sure we dont read this frame but the next */
     xdr_int(xdrs, &step);
-    while (1)
+    while (true)
     {
         ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time);
         if (ret == 1)
@@ -1140,7 +1140,7 @@ static float xtc_get_next_frame_time(FILE *fp, XDR *xdrs, int natoms,
     float     time;
     int       step;
     int       ret;
-    *bOK = 0;
+    *bOK = false;
 
     if ((off = gmx_ftell(fp)) < 0)
     {
@@ -1148,15 +1148,15 @@ static float xtc_get_next_frame_time(FILE *fp, XDR *xdrs, int natoms,
     }
     /* read one int just to make sure we dont read this frame but the next */
     xdr_int(xdrs, &step);
-    while (1)
+    while (true)
     {
         ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time);
         if (ret == 1)
         {
-            *bOK = 1;
+            *bOK = true;
             if (gmx_fseek(fp, off, SEEK_SET))
             {
-                *bOK = 0;
+                *bOK = false;
                 return -1;
             }
             return time;
@@ -1180,22 +1180,22 @@ xtc_get_current_frame_time(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK)
     int       step;
     float     time;
     int       ret;
-    *bOK = 0;
+    *bOK = false;
 
     if ((off = gmx_ftell(fp)) < 0)
     {
         return -1;
     }
 
-    while (1)
+    while (true)
     {
         ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time);
         if (ret == 1)
         {
-            *bOK = 1;
+            *bOK = true;
             if (gmx_fseek(fp, off, SEEK_SET))
             {
-                *bOK = 0;
+                *bOK = false;
                 return -1;
             }
             return time;
@@ -1227,7 +1227,7 @@ xtc_get_current_frame_number(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK)
     int       ret;
     int       step;
     float     time;
-    *bOK = 0;
+    *bOK = false;
 
     if ((off = gmx_ftell(fp)) < 0)
     {
@@ -1235,15 +1235,15 @@ xtc_get_current_frame_number(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK)
     }
 
 
-    while (1)
+    while (true)
     {
         ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time);
         if (ret == 1)
         {
-            *bOK = 1;
+            *bOK = true;
             if (gmx_fseek(fp, off, SEEK_SET))
             {
-                *bOK = 0;
+                *bOK = false;
                 return -1;
             }
             return step;
@@ -1278,7 +1278,7 @@ static gmx_off_t xtc_get_next_frame_start(FILE *fp, XDR *xdrs, int natoms)
     float     time;
     /* read one int just to make sure we dont read this frame but the next */
     xdr_int(xdrs, &step);
-    while (1)
+    while (true)
     {
         ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time);
         if (ret == 1)
@@ -1308,7 +1308,7 @@ xdr_xtc_estimate_dt(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK)
     float     tinit;
     gmx_off_t off;
 
-    *bOK = 0;
+    *bOK = false;
     if ((off   = gmx_ftell(fp)) < 0)
     {
         return -1;
@@ -1331,7 +1331,7 @@ xdr_xtc_estimate_dt(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK)
     res -= tinit;
     if (0 != gmx_fseek(fp, off, SEEK_SET))
     {
-        *bOK = 0;
+        *bOK = false;
         return -1;
     }
     return res;
@@ -1367,7 +1367,7 @@ xdr_xtc_seek_frame(int frame, FILE *fp, XDR *xdrs, int natoms)
         return -1;
     }
 
-    while (1)
+    while (true)
     {
         fr = xtc_get_next_frame_number(fp, xdrs, natoms);
         if (fr < 0)
@@ -1466,7 +1466,7 @@ int xdr_xtc_seek_time(real time, FILE *fp, XDR *xdrs, int natoms, gmx_bool bSeek
        }
      */
 
-    while (1)
+    while (true)
     {
         dt = xdr_xtc_estimate_dt(fp, xdrs, natoms, &bOK);
         if (!bOK)
@@ -1590,17 +1590,17 @@ xdr_xtc_get_last_frame_time(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK)
 {
     float      time;
     gmx_off_t  off;
-    *bOK = 1;
+    *bOK = true;
     off  = gmx_ftell(fp);
     if (off < 0)
     {
-        *bOK = 0;
+        *bOK = false;
         return -1;
     }
 
     if (gmx_fseek(fp, -3*XDR_INT_SIZE, SEEK_END) != 0)
     {
-        *bOK = 0;
+        *bOK = false;
         return -1;
     }
 
@@ -1612,7 +1612,7 @@ xdr_xtc_get_last_frame_time(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK)
 
     if (gmx_fseek(fp, off, SEEK_SET) != 0)
     {
-        *bOK = 0;
+        *bOK = false;
         return -1;
     }
     return time;
@@ -1624,18 +1624,18 @@ xdr_xtc_get_last_frame_number(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK)
 {
     int        frame;
     gmx_off_t  off;
-    *bOK = 1;
+    *bOK = true;
 
     if ((off = gmx_ftell(fp)) < 0)
     {
-        *bOK = 0;
+        *bOK = false;
         return -1;
     }
 
 
     if (gmx_fseek(fp, -3*XDR_INT_SIZE, SEEK_END))
     {
-        *bOK = 0;
+        *bOK = false;
         return -1;
     }
 
@@ -1648,7 +1648,7 @@ xdr_xtc_get_last_frame_number(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK)
 
     if (gmx_fseek(fp, off, SEEK_SET))
     {
-        *bOK = 0;
+        *bOK = false;
         return -1;
     }
 
index 10f1c165aa0fbb8b80f89c6e91aec15f625ec396..714a00033def8717366fc84eb06fc115a1f8cade 100644 (file)
@@ -1001,7 +1001,7 @@ static void do_inputrec(t_fileio *fio, t_inputrec *ir, gmx_bool bRead,
 {
     int      i, j, k, idum = 0;
     real     rdum;
-    gmx_bool bdum = 0;
+    gmx_bool bdum = false;
 
     if (file_version != tpx_version)
     {
index 4b587df7ef453416b3f21eec4416e50bd58bb8e5..64e23e524707c75137d18c3ce9e3b1a57c012407 100644 (file)
 /*                                                                           */
 /*****************************************************************************/
 
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cassert>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 /*
  * Plugin header files; get plugin source from www.ks.uiuc.edu/Research/vmd"
 #include "gromacs/utility/smalloc.h"
 
 
-typedef int (*initfunc)(void);
+typedef int (*initfunc)();
 typedef int (*regfunc)(void *, vmdplugin_register_cb);
-typedef int (*finifunc)(void);
+typedef int (*finifunc)();
 
 
 
@@ -211,7 +211,7 @@ gmx_bool read_next_vmd_frame(gmx_vmdplugin_t *vmdplugin, t_trxframe *fr)
     if (rc < 0)
     {
         vmdplugin->api->close_file_read(vmdplugin->handle);
-        return 0;
+        return false;
     }
 
 #if GMX_DOUBLE
@@ -243,8 +243,8 @@ gmx_bool read_next_vmd_frame(gmx_vmdplugin_t *vmdplugin, t_trxframe *fr)
     }
 #endif
 
-    fr->bX   = 1;
-    fr->bBox = 1;
+    fr->bX   = true;
+    fr->bBox = true;
     vec[0]   = .1*ts.A; vec[1] = .1*ts.B; vec[2] = .1*ts.C;
     angle[0] = ts.alpha; angle[1] = ts.beta; angle[2] = ts.gamma;
     matrix_convert(fr->box, vec, angle);
@@ -259,7 +259,7 @@ gmx_bool read_next_vmd_frame(gmx_vmdplugin_t *vmdplugin, t_trxframe *fr)
     }
 
 
-    return 1;
+    return true;
 }
 
 static int load_vmd_library(const char *fn, gmx_vmdplugin_t *vmdplugin)
@@ -430,7 +430,7 @@ int read_first_vmd_frame(const char *fn, gmx_vmdplugin_t **vmdpluginp, t_trxfram
 
     snew(fr->x, fr->natoms);
 
-    vmdplugin->bV = 0;
+    vmdplugin->bV = false;
     if (vmdplugin->api->abiversion > 10 && vmdplugin->api->read_timestep_metadata)
     {
         vmdplugin->api->read_timestep_metadata(vmdplugin->handle, metadata);
index f7e7fbea7c38c8fd9313240373b6afef89e51f1f..dd1d4683617f8edaf0e19f836e3dc84a0ed1cd71 100644 (file)
@@ -318,7 +318,7 @@ OutputFile::OutputFile(const std::string &filename,
     numDim_(0),
     firstGraphSubBlock_(0),
     numGraph_(0),
-    useKTForEnergy_(0)
+    useKTForEnergy_(false)
 
 {
     baseFilename_ = filename.substr(0, filename.find('.'));
index 71327f818829e2bc6cff14c302061ace95b689d4..af0530c08dd026f1991c0479fcbaff1124ca12c7 100644 (file)
@@ -2272,7 +2272,7 @@ static gmx_bool read_lambda_compvec(const char                *str,
         lc_in = lc_out;
     }
 
-    while (1)
+    while (true)
     {
         if (!start_reached)
         {
index d4cbcaa3dac2dce782a414dad369988a0d73611f..94997770cc7ee988d06940d30c05f295bc324548 100644 (file)
@@ -266,7 +266,7 @@ static void density_in_time (const char *fn, int **index, const int gnx[], real
     gmx_rmpbc_done(gpbc);
     close_trx(status);
 
-    if (/* DISABLES CODE */ (0))
+    if (/* DISABLES CODE */ (false))
     {
         FILE *fp;
         fp = fopen("koko.xvg", "w");
index 7000f0ad9eab331c3691bf6a7403344957b79d10..9934e3d986c07001da28bbe1ea7da41599117257 100644 (file)
@@ -95,7 +95,7 @@ static void init5(int n)
     snew(top, ntop);
 }
 
-static void reset5(void)
+static void reset5()
 {
     int i;
 
index 41a9f2df777169b8729427883aa3b24f063bbe6a..157d53da359a49946d0e1556a489106ea9d62800 100644 (file)
@@ -262,7 +262,7 @@ static void _set_hb(unsigned int hbexist[], unsigned int frame, gmx_bool bValue)
 
 static gmx_bool is_hb(const unsigned int hbexist[], int frame)
 {
-    return ((hbexist[OFFSET(frame)] & MASK(frame)) != 0) ? 1 : 0;
+    return (hbexist[OFFSET(frame)] & MASK(frame)) != 0;
 }
 
 static void set_hb(t_hbdata *hb, int id, int ih, int ia, int frame, int ihb)
index 31c7e6e11f4122a0113ad54511a42a7784d7f4ab..77d361396d57ad05d0041c80d18022915d12201f 100644 (file)
@@ -863,7 +863,7 @@ int gmx_make_edi(int argc, char *argv[])
                       &xref1, &edi_params.fitmas, &xav1, &edi_params.pcamas, &nvec1, &eignr1, &eigvec1, &eigval1);
 
     read_tps_conf(ftp2fn(efTPS, NFILE, fnm),
-                  &top, &ePBC, &xtop, nullptr, topbox, 0);
+                  &top, &ePBC, &xtop, nullptr, topbox, false);
     atoms = &top.atoms;
 
 
index fab8faef8e31a1dfe3e51e4aa19289999e851ae0..9a13ea723815fe54e4a9a5fe87da2dc075907f1a 100644 (file)
@@ -917,7 +917,7 @@ static void do_corr(const char *trx_file, const char *ndx_file, const char *msd_
                     beginfit, endfit);
 
     nat_trx =
-        corr_loop(msd, trx_file, top, ePBC, mol_file ? gnx[0] : 0, gnx, index,
+        corr_loop(msd, trx_file, top, ePBC, mol_file ? gnx[0] : false, gnx, index,
                   (mol_file != nullptr) ? calc1_mol : (bMW ? calc1_mw : calc1_norm),
                   bTen, gnx_com, index_com, dt, t_pdb,
                   pdb_file ? &x : nullptr, box, oenv);
index 3131aceaaf68a75e2eca421171d7730ec3628fa8..4c39aa2e41d05036344d19aca395480d4b00ba4a 100644 (file)
@@ -422,7 +422,7 @@ int gmx_potential(int argc, char *argv[])
     static int         ngrps      = 1;
     static gmx_bool    bSpherical = FALSE;   /* default is bilayer types   */
     static real        fudge_z    = 0;       /* translate coordinates      */
-    static gmx_bool    bCorrect   = 0;
+    static gmx_bool    bCorrect   = false;
     t_pargs            pa []      = {
         { "-d",   FALSE, etSTR, {&axtitle},
           "Take the normal on the membrane in direction X, Y or Z." },
index f2e2125e5949d65975f6ded83741a2c135c5cbd7..55771c8e17bccb0378c6208a2d69dbaaeedff215 100644 (file)
@@ -1054,7 +1054,8 @@ int gmx_trjconv(int argc, char *argv[])
             /* Check for number of files disabled, as FOPEN_MAX is not the correct
              * number to check for. In my linux box it is only 16.
              */
-            if (/* DISABLES CODE */ (0) && (clust->clust->nr > FOPEN_MAX-4))
+            if (/* DISABLES CODE */ (false))
+            //if (clust->clust->nr > FOPEN_MAX-4)
             {
                 gmx_fatal(FARGS, "Can not open enough (%d) files to write all the"
                           " trajectories.\ntry splitting the index file in %d parts.\n"
index 01606649bcdfb5068b2f934eccb73792ab148a8c..d9f171f94373b7353de060011704397ebaeee88c 100644 (file)
@@ -579,7 +579,7 @@ static void read_pdo_data(FILE * file, t_UmbrellaHeader * header,
     double             temp, time, time0 = 0, dt;
     char              *ptr    = nullptr;
     t_UmbrellaWindow * window = nullptr;
-    gmx_bool           timeok, dt_ok = 1;
+    gmx_bool           timeok, dt_ok = true;
     char              *tmpbuf   = nullptr, fmt[256], fmtign[256], fmtlf[5] = "%lf";
     int                len      = STRLEN, dstep = 1;
     const int          blocklen = 4096;
@@ -1851,7 +1851,7 @@ static FILE *open_pdo_pipe(const char *fn, t_UmbrellaOptions *opt, gmx_bool *bPi
 {
     char            Buffer[1024], gunzip[1024], *Path = nullptr;
     FILE           *pipe   = nullptr;
-    static gmx_bool bFirst = 1;
+    static gmx_bool bFirst = true;
 
     /* gzipped pdo file? */
     if ((std::strcmp(fn+std::strlen(fn)-3, ".gz") == 0))
@@ -1886,7 +1886,7 @@ static FILE *open_pdo_pipe(const char *fn, t_UmbrellaOptions *opt, gmx_bool *bPi
         if (bFirst)
         {
             printf("Using gunzip executable %s\n", gunzip);
-            bFirst = 0;
+            bFirst = false;
         }
         if (!gmx_fexist(fn))
         {
index 96eca851e15aca7d949c3abd50acc5d018f4ecf5..901d48a7c5db38b8644ab902745e9b0ad24a4414 100644 (file)
@@ -50,7 +50,7 @@ struct gmx_multisim_t;
 struct t_commrec;
 struct t_filenm;
 
-struct t_commrec *init_commrec(void);
+struct t_commrec *init_commrec();
 /* Allocate, initialize and return the commrec. */
 
 void done_commrec(t_commrec *cr);
index 542795b1655801d564f74156c9748069305a58ce..57bd21d9a537525bfb5ba77f44fa67f1af9a4a4d 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "config.h"
 
-#include <math.h>
+#include <cmath>
 
 #include "gromacs/gmxlib/nrnb.h"
 #include "gromacs/math/functions.h"
index 4a07968e4efa0bdccd0ae6f5941fcc802376556f..aca94d8a2d576b0defa360a0329a983723200eb7 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "add_par.h"
 
-#include <string.h>
+#include <cstring>
 
 #include <algorithm>
 
index ff4a568384394835fd88fc7ebd54a3c1f6bf4c6d..185a7f709a7962bf1dce9a62cf0e24be7e03236e 100644 (file)
 
 #include "convparm.h"
 
-#include <string.h>
-
 #include <cassert>
 #include <cmath>
+#include <cstring>
 
 #include "gromacs/gmxpreprocess/gpp_atomtype.h"
 #include "gromacs/gmxpreprocess/topio.h"
index f8897302e206a1a74f719890d4eb8a3b47d8b0a7..3b55c4e836406c556b8e2b9f033baf74d684a8c2 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "fflibutil.h"
 
-#include <string.h>
+#include <cstring>
 
 #include <string>
 #include <vector>
index 957a2454b45f76118c4d090f783001da084a240f..780ee80f4a7da1c8496eed3b053192cbdf0c8164 100644 (file)
 
 #include "gen_ad.h"
 
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cctype>
 #include <cmath>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 
index 3135ab3b208afb609c936575807a57f7560f1910..abedc9cef0e7b4523af7dec6d2af721310d00a00 100644 (file)
 
 #include "gen_vsite.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 #include "gromacs/fileio/pdbio.h"
 #include "gromacs/gmxpreprocess/add_par.h"
index e9a41c160007df625de78edebbd87b58aa491ac6..e47c79e588eea88f19b76b731ce85a961b1e087e 100644 (file)
@@ -38,8 +38,8 @@
 
 #include "genhydro.h"
 
-#include <string.h>
-#include <time.h>
+#include <cstring>
+#include <ctime>
 
 #include "gromacs/fileio/confio.h"
 #include "gromacs/gmxlib/network.h"
index a771394479c18060e2e2a5a528925c21437a9526..5e9c584807762a5be48fad792c9c87b40c5c1279 100644 (file)
 
 #include "gmxcpp.h"
 
-#include <ctype.h>
-#include <errno.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cctype>
+#include <cerrno>
+#include <climits>
 #include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 
@@ -712,22 +711,6 @@ int cpp_close_file(gmx_cpp_t *handlep)
         gmx_chdir(handle->cwd);
     }
 
-    if (0)
-    {
-        switch (errno)
-        {
-            case 0:
-                break;
-            case ENOENT:
-                return eCPP_FILE_NOT_FOUND;
-            case EBADF:
-                return eCPP_FILE_NOT_OPEN;
-            case EINTR:
-                return eCPP_INTERRUPT;
-            default:
-                return eCPP_UNKNOWN;
-        }
-    }
     handle->fp      = nullptr;
     handle->line_nr = 0;
     if (nullptr != handle->fn)
index 033fb2015c9e2cf8eb68eeda0d4c36249a721896..5bbb1839e9869450e9e2e2ce8de4971db2d3484f 100644 (file)
 
 #include "gpp_atomtype.h"
 
-#include <string.h>
-
 #include <climits>
 #include <cmath>
+#include <cstring>
 
 #include "gromacs/gmxpreprocess/notset.h"
 #include "gromacs/gmxpreprocess/topdirs.h"
@@ -176,7 +175,7 @@ real get_atomtype_nbparam(int nt, int param, gpp_atomtype_t ga)
     return ga->nb[nt].c[param];
 }
 
-gpp_atomtype_t init_atomtype(void)
+gpp_atomtype_t init_atomtype()
 {
     gpp_atomtype_t ga;
 
index 66d5285b0dbb0cc408b9c51aa72c23998e869f11..20af27744ec83cf8a0e647208ce773de2298aafc 100644 (file)
@@ -69,7 +69,7 @@ int get_atomtype_atomnumber(int nt, gpp_atomtype_t at);
 real get_atomtype_nbparam(int nt, int param, gpp_atomtype_t at);
 /* Similar to the previous but returns the paramth parameter or NOTSET */
 
-gpp_atomtype_t init_atomtype(void);
+gpp_atomtype_t init_atomtype();
 /* Return a new atomtype structure */
 
 void done_atomtype(gpp_atomtype_t at);
index ce31d32f8b6bb512f01fa3b11d9433f17ee1394c..48ac1c4f6739daa061a2e327c028e9756f6d689b 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "gpp_bond_atomtype.h"
 
-#include <string.h>
+#include <cstring>
 
 #include "gromacs/gmxpreprocess/notset.h"
 #include "gromacs/topology/symtab.h"
@@ -80,7 +80,7 @@ char *get_bond_atomtype_name(int nt, t_bond_atomtype at)
     return *(ga->atomname[nt]);
 }
 
-t_bond_atomtype init_bond_atomtype(void)
+t_bond_atomtype init_bond_atomtype()
 {
     gpp_bond_atomtype *ga;
 
index cd3d3c60d11dcdf2405e88e1229c4d0025068d0b..4f0b6b26776adfadc235ed5bfe3e2604e08e7592 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2011,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2011,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -49,7 +49,7 @@ int get_bond_atomtype_type(char *str, t_bond_atomtype at);
 char *get_bond_atomtype_name(int nt, t_bond_atomtype at);
 /* Return name corresponding to atomtype nt, or NULL if not found */
 
-t_bond_atomtype init_bond_atomtype(void);
+t_bond_atomtype init_bond_atomtype();
 /* Return a new atomtype structure */
 
 void done_bond_atomtype(t_bond_atomtype *at);
index a1e1baa09cfd94ba349a4617342d25a0f176053b..e9ac0563ebc2ebd99d5e8ab131323214501fec5b 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "gpp_nextnb.h"
 
-#include <stdlib.h>
+#include <cstdlib>
 
 #include "gromacs/gmxpreprocess/toputil.h"
 #include "gromacs/topology/ifunc.h"
index c3fe8e350d5521f7e5acf53a4684de07d841215c..960834afa203011eaba2750f44225df6fb4b262c 100644 (file)
 
 #include "grompp.h"
 
-#include <errno.h>
-#include <limits.h>
-#include <string.h>
-
+#include <cerrno>
+#include <climits>
 #include <cmath>
+#include <cstring>
 
 #include <algorithm>
 
index d21ff1094f9231217b35bdcc7f1de5480365b212..c8d2bc623f099997bb09f04d7b99d1d2aa60a13a 100644 (file)
@@ -39,8 +39,8 @@
 
 #include "h_db.h"
 
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
 
 #include "gromacs/gmxpreprocess/fflibutil.h"
 #include "gromacs/gmxpreprocess/notset.h"
index ad2a5fd73607c779d6b4bacda4503cf65dc75e44..9293a66eb0495b6d2e11b78fe716dbfd0f4add4a 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "hackblock.h"
 
-#include <string.h>
+#include <cstring>
 
 #include "gromacs/gmxpreprocess/notset.h"
 #include "gromacs/math/vec.h"
index c81add20c39ff09d64174776fd7fd432bb6b36d4..b7ddc4694b50cfbd318056bf9a65030c140564ec 100644 (file)
 
 #include "hizzie.h"
 
-#include <stdio.h>
-#include <string.h>
-
 #include <cmath>
+#include <cstdio>
+#include <cstring>
 
 #include "gromacs/fileio/pdbio.h"
 #include "gromacs/gmxpreprocess/pdb2top.h"
index a469435ced2b59c7a510386857ed0c8f16847ab6..0bb7da27ffa5c1a8bc4e20c0f96b974f70880d0e 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "nm2type.h"
 
-#include <string.h>
+#include <cstring>
 
 #include <algorithm>
 
index 38399157a165c3e3f79102724c108e1388f7ff03..df98f0905cc1f4d50c339e7c6b968071d146a3dd 100644 (file)
 
 #include "pdb2gmx.h"
 
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
+#include <cctype>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
 
 #include <algorithm>
 
index 913d227827cad1612dbbd71c55aee8ea4cae7e01..f74c9c3d7692b2114de4137f7af1a705ab09e161 100644 (file)
 
 #include "pdb2top.h"
 
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-
+#include <cctype>
 #include <cmath>
+#include <cstdio>
+#include <cstring>
 
 #include <algorithm>
 #include <string>
index 1dfd29551f8d698803fc4720c5af7308abd17146..91e44ef6decdaf6e0e0f66ce09d4ccd63ac2b606 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "pgutil.h"
 
-#include <string.h>
+#include <cstring>
 
 #include "gromacs/topology/atoms.h"
 #include "gromacs/utility/cstringutil.h"
index 27e30adbcbadf4979603b6aace4b566d082164b8..3a3873782b3834463778af7d1b40a7c42c60cb39 100644 (file)
 
 #include "readir.h"
 
-#include <ctype.h>
-#include <limits.h>
-#include <stdlib.h>
-
+#include <cctype>
+#include <climits>
 #include <cmath>
+#include <cstdlib>
 
 #include <algorithm>
 #include <string>
index f1bef30049d2b770e5d7497f1ad6424cc6ab9b79..32120e5ccf4330a9408ca3912e4e8fbb153ab1b7 100644 (file)
@@ -36,9 +36,9 @@
  */
 #include "gmxpre.h"
 
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cassert>
+#include <cstdlib>
+#include <cstring>
 
 #include "gromacs/domdec/localatomsetmanager.h"
 #include "gromacs/fileio/readinp.h"
index b2bc373a742781fa5fddfc35c17b160e2940996e..30aa182e2624cd8f2bf211abe8e45e47ebaedf27 100644 (file)
@@ -38,9 +38,9 @@
 
 #include "resall.h"
 
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cctype>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 
index f4158c16173bd0a013e3b7d660f44915bd9092e8..ceac85da9c5a3bc5ec996b93988c50aed82760e1 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "solvate.h"
 
-#include <string.h>
+#include <cstring>
 
 #include <algorithm>
 #include <vector>
index 6edf21783666b33a175c3528b46db7153821773f..cd72daf5e4e0928c66f0a4c657368ee93d9a44e7 100644 (file)
 
 #include "specbond.h"
 
-#include <ctype.h>
-#include <string.h>
-
+#include <cctype>
 #include <cmath>
+#include <cstring>
 
 #include <algorithm>
 
@@ -53,7 +52,7 @@
 #include "gromacs/utility/smalloc.h"
 #include "gromacs/utility/strdb.h"
 
-bool yesno(void)
+bool yesno()
 {
     char c;
 
index 645c82bf0d6937570c08135a9a1a55b0eb830daa..fc0de3519f61b30fc6e46dedbd9487142be4da72 100644 (file)
@@ -43,6 +43,6 @@
 int mk_specbonds(t_atoms *pdba, rvec x[], bool bInteractive,
                  t_ssbond **specbonds, bool bVerbose);
 
-bool yesno(void);
+bool yesno();
 
 #endif
index f7ebbd5708deab4b78674c977e7984e800e4f45c..782ad1be9ddc6734627e4060f96f621c5e680bed 100644 (file)
@@ -38,8 +38,8 @@
 
 #include "ter_db.h"
 
-#include <ctype.h>
-#include <string.h>
+#include <cctype>
+#include <cstring>
 
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/gmxpreprocess/fflibutil.h"
index be2b42284b816d7ce2b6f500b94f264743222402..c26a47b4b6cb6a8a601ba33089ba679d2e1c2f7d 100644 (file)
 
 #include "tomorse.h"
 
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cctype>
 #include <cmath>
+#include <cstdlib>
+#include <cstring>
 
 #include "gromacs/gmxpreprocess/gpp_atomtype.h"
 #include "gromacs/gmxpreprocess/grompp-impl.h"
index a57275f2a06d62c09a41d0ba362de711c79f2b37..90d9c5d8a0963b1fda93e930058a27da2bc4b77d 100644 (file)
@@ -38,8 +38,8 @@
 
 #include "topdirs.h"
 
-#include <stdarg.h>
-#include <stdio.h>
+#include <cstdarg>
+#include <cstdio>
 
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
index 4354a3f05e1c9bdf7659020e95df30aa94422db6..cd918f3d7436169cfb9ebdd6a8cf575c75936c46 100644 (file)
 
 #include "topio.h"
 
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include <cassert>
+#include <cctype>
+#include <cerrno>
 #include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 
index 5f81a3d7e47947f3e91a216936ccf7f843c58420..02d4c9f2bd865685f3810638029be83d41701998 100644 (file)
 
 #include "toppush.h"
 
-#include <ctype.h>
-#include <stdlib.h>
-
+#include <cctype>
 #include <cmath>
+#include <cstdlib>
 #include <cstring>
 
 #include <algorithm>
index 4a3725a0e837a1988f1d8757e8f8ef7776d961d8..cf48da1d8a85c6ac6e23df7959759edaec85fbba 100644 (file)
@@ -39,8 +39,7 @@
 
 #include "topshake.h"
 
-#include <ctype.h>
-
+#include <cctype>
 #include <cmath>
 
 #include "gromacs/gmxpreprocess/notset.h"
index 5a38d4d7a1d3032f1205cef323e03c85349f5ddf..8a66e7bf73b79ed2217b1472e711e2630b459715 100644 (file)
 
 #include "toputil.h"
 
-#include <string.h>
-
 #include <climits>
 #include <cmath>
+#include <cstring>
 
 #include <algorithm>
 
index ef8c8a1408f4087a0da5ad63e8e678c699f7dc52..ae5062496dd6772fdce24da4c5185496a564e31d 100644 (file)
 
 #include "vsite_parm.h"
 
-#include <stdio.h>
-#include <string.h>
-
 #include <cmath>
+#include <cstdio>
+#include <cstring>
 
 #include <algorithm>
 
index 44acfaae35f0075a57d6c87d8146b47b8dd46166..60d4d8e54debd80785bc6a782d950420c21380e7 100644 (file)
@@ -38,8 +38,8 @@
 
 #include "xlate.h"
 
-#include <ctype.h>
-#include <string.h>
+#include <cctype>
+#include <cstring>
 
 #include "gromacs/gmxpreprocess/fflibutil.h"
 #include "gromacs/gmxpreprocess/hackblock.h"
index a9c9458e66fd76d4423bd3bca5217b4c6babb164..7b3ae87f2172be2512a8320f07f6934778fc2008 100644 (file)
@@ -51,8 +51,8 @@
 
 #include "config.h"
 
-#include <errno.h>
-#include <string.h>
+#include <cerrno>
+#include <cstring>
 
 #if GMX_NATIVE_WINDOWS
 #include <windows.h>
index d5a5cfb4184d58c3592758fbf6dcb6d247368397..0820c57c934036306040d6de26b975b043e7101d 100644 (file)
@@ -52,8 +52,8 @@
 
 #include "config.h"
 
-#include <errno.h>
-#include <string.h>
+#include <cerrno>
+#include <cstring>
 
 #include "gromacs/imd/imd.h"
 #include "gromacs/utility/fatalerror.h"
@@ -81,7 +81,7 @@ extern int imdsock_winsockinit()
 /* On UNIX, we can use nice errors from errno.h */
 #include <unistd.h>
 #ifdef GMX_IMD
-#include <time.h>
+#include <ctime>
 
 #include <sys/select.h>
 #include <sys/time.h>
index 23dbbd1d41ca33b4cc01d3f90aeba1592ef2f16c..50aaa3ddbbbbe3d52822950190840982b9e250b4 100644 (file)
@@ -45,7 +45,7 @@
 
 #include "listed-forces.h"
 
-#include <assert.h>
+#include <cassert>
 
 #include <algorithm>
 
index 82885e4af5ef3815ac11bdd022b59b798eee5b4d..b62ac48a98094fe0cb67d27bfa7f15c7d6cf8504 100644 (file)
@@ -47,9 +47,9 @@
 
 #include "config.h"
 
-#include <assert.h>
-#include <limits.h>
-#include <stdlib.h>
+#include <cassert>
+#include <climits>
+#include <cstdlib>
 
 #include <algorithm>
 
index 6ceebe5c7f9e62caf7f5db341a9c6bed9bbb9eb8..f8f83bddd6135bc0ef8623baea9d2866e9339e4b 100644 (file)
@@ -46,8 +46,7 @@
 
 #include "position-restraints.h"
 
-#include <assert.h>
-
+#include <cassert>
 #include <cmath>
 
 #include "gromacs/gmxlib/nrnb.h"
index 8a79c79692e7c192bad01ca5cf56f2d3e4302cf2..05f62d8a618304a5faf5c01847005a3a984a14f9 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2010,2014,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2010,2014,2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -38,9 +38,8 @@
 
 #include "3dtransforms.h"
 
-#include <stdio.h>
-
 #include <cmath>
+#include <cstdio>
 
 #include "gromacs/math/vec.h"
 #include "gromacs/utility/fatalerror.h"
index b9584d97a281d4b33347b8926b12b26dd196d2a9..d3e11eb2d8e419fd648650b5515fe57cbf4c8c3c 100644 (file)
@@ -38,9 +38,8 @@
 
 #include "do_fit.h"
 
-#include <stdio.h>
-
 #include <cmath>
+#include <cstdio>
 
 #include "gromacs/linearalgebra/nrjac.h"
 #include "gromacs/math/functions.h"
index c4fb43ed079df1fac1408a7f06920867379901b9..f16e988a430abe6bcf5f46cfcc134f766e475827 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2014,2015,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -36,7 +36,7 @@
 
 #include "units.h"
 
-#include <stdio.h>
+#include <cstdio>
 
 #include "gromacs/utility/cstringutil.h"
 
index 0c4fedbae362ad9848906dcd829b72e12f324119..6110b3e13daa96c8eb4cbced42ec0d65d5776ff2 100644 (file)
@@ -40,9 +40,8 @@
 
 #include "config.h"
 
-#include <assert.h>
-#include <limits.h>
-
+#include <cassert>
+#include <climits>
 #include <cmath>
 
 #include <algorithm>
index ca47814b74903e68bf51a2c43d108e369eb81c7b..29157e7ff890d7fdbfe37b163199ab885c93c5c4 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "broadcaststructs.h"
 
-#include <string.h>
+#include <cstring>
 
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/math/vec.h"
index 56ab300b2bc22b5a95b145b9f22080f377f7c182..47fc1c9580c15a04b2dc6db6f1c82f5afdd8a5c4 100644 (file)
 
 #include "calc_verletbuf.h"
 
-#include <assert.h>
-#include <stdlib.h>
-
+#include <cassert>
 #include <cmath>
+#include <cstdlib>
 
 #include <algorithm>
 
index f9d4979d9cec8d10eb8a8989ca2a9f84b0749381..2cf1e3581674a1809bf54af7c412f67f51a4f829 100644 (file)
@@ -39,8 +39,8 @@
 
 #include "calcmu.h"
 
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
 
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/math/units.h"
index f3df0b4f2e384ed810dd7318908d590230ef1834..36cad80422378a17a01e9497c1c0e38299572459 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -38,8 +38,8 @@
 
 #include "compute_io.h"
 
-#include <signal.h>
-#include <stdlib.h>
+#include <csignal>
+#include <cstdlib>
 
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
index 5e085c375a690b61109ae24ec4cd05a3fb605381..82b722ef02d4c406181e7aef279cfac12fce46c0 100644 (file)
 
 #include "constr.h"
 
-#include <assert.h>
-#include <stdlib.h>
-
+#include <cassert>
 #include <cmath>
+#include <cstdlib>
 
 #include <algorithm>
 
index 7fd5594d20a272789a22c1291ee5ff4f13228aac..89c8cf2fb5ec7956af3eeffef64a22268a514b7b 100644 (file)
@@ -36,8 +36,7 @@
  */
 #include "gmxpre.h"
 
-#include <assert.h>
-
+#include <cassert>
 #include <cmath>
 
 #include <algorithm>
index 655d5a440679961b4cce597829d3d3873a6f61e3..45633bbf7eda11dfcc499318c1737bfbc323cd1e 100644 (file)
@@ -39,9 +39,8 @@
 
 #include "ebin.h"
 
-#include <string.h>
-
 #include <cmath>
+#include <cstring>
 
 #include "gromacs/math/units.h"
 #include "gromacs/math/utilities.h"
@@ -52,7 +51,7 @@
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
-t_ebin *mk_ebin(void)
+t_ebin *mk_ebin()
 {
     t_ebin *eb;
 
index 2c4240af2511fb55279fdfe5f47d64eb0c977741..3a52717748c39ccd8be761e08c8b32eebeb67c21 100644 (file)
@@ -59,7 +59,7 @@ enum {
     eprNORMAL, eprAVER, eprRMS, eprNR
 };
 
-t_ebin *mk_ebin(void);
+t_ebin *mk_ebin();
 /* Create an energy bin */
 
 //! Empty the contents of \c eb.
index dc83030e603bcf4adad8f6b7f4e3e66eebe223c0..88686630fee16071ab302410360b6b42e2ae4e01 100644 (file)
@@ -36,9 +36,8 @@
 
 #include "expanded.h"
 
-#include <stdio.h>
-
 #include <cmath>
+#include <cstdio>
 
 #include <algorithm>
 
index 45929d219f1b8fef8381d65ea66ae5e6239f3ba2..90b9b6c6ed0b7f75d6da83f853389e82fc4bfe15 100644 (file)
 
 #include "config.h"
 
-#include <assert.h>
-#include <string.h>
-
+#include <cassert>
 #include <cmath>
+#include <cstring>
 
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/domdec/domdec_struct.h"
index 3d30bc8f4091319233726d818e9039381cdc392e..f3f8e5458e4c5f465d4a3feb9a7fac83dbb9e30a 100644 (file)
 
 #include "config.h"
 
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cassert>
 #include <cmath>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 
 
 #include "nbnxn_gpu_jit_support.h"
 
-t_forcerec *mk_forcerec(void)
+t_forcerec *mk_forcerec()
 {
     t_forcerec *fr;
 
index 4d36ba7395ce2551d90d28e13c5b829e885f72ec..64e60c7332eadef06b624f466ea6a92cfc24cc97 100644 (file)
@@ -58,7 +58,7 @@ class PhysicalNodeCommunicator;
 }
 
 /*! \brief Create a new forcerec structure */
-t_forcerec *mk_forcerec(void);
+t_forcerec *mk_forcerec();
 
 //! Destroy a forcerec.
 void done_forcerec(t_forcerec *fr, int numMolBlocks, int numEnergyGroups);
index a5171a3daa268dfe8d889c86ce39ab05b3ca41b0..95b8ef17ce1938a420c9ab3c106bc0932eb3ea86 100644 (file)
 
 #include "config.h"
 
-#include <assert.h>
-#include <stdlib.h>
-
+#include <cassert>
 #include <cmath>
+#include <cstdlib>
 
 #include <algorithm>
 #include <vector>
index b8ea3238eb3324b06c375f522b5a697818fa155a..59ed7ad46f06547bba724b5ab9fd4e8d9a4e86e0 100644 (file)
@@ -38,9 +38,9 @@
 
 #include "mdebin.h"
 
-#include <float.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cfloat>
+#include <cstdlib>
+#include <cstring>
 
 #include "gromacs/awh/awh.h"
 #include "gromacs/fileio/enxio.h"
index 0597e8aaf9678756aeba3429dcefa42fa5c02a76..7b2c030e7978a33437097010bedd3f5c55a07e0b 100644 (file)
 
 #include "mdebin_bar.h"
 
-#include <float.h>
-#include <string.h>
-
 #include <cassert>
+#include <cfloat>
 #include <cmath>
+#include <cstring>
 
 #include "gromacs/compat/make_unique.h"
 #include "gromacs/fileio/enxio.h"
index 11aeffa7127e22946c2bd6bdbcfb1c744e76f59b..915f1f1da838b335c02472d38b6f8c5221575dab 100644 (file)
@@ -36,8 +36,8 @@
 
 #include "membed.h"
 
-#include <signal.h>
-#include <stdlib.h>
+#include <csignal>
+#include <cstdlib>
 
 #include "gromacs/commandline/filenm.h"
 #include "gromacs/fileio/readinp.h"
index a79e1cb6d514b63b919e52c8676d6c2aa094199d..5cffe634fdbc97b643df33d7be73736a5676f21c 100644 (file)
 
 #include "nbnxn_atomdata.h"
 
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cassert>
 #include <cmath>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 
@@ -761,7 +760,7 @@ void nbnxn_atomdata_init(const gmx::MDLogger &mdlog,
 #endif
     else
     {
-        nbat->bUseTreeReduce = 0;
+        nbat->bUseTreeReduce = false;
     }
     if (nbat->bUseTreeReduce)
     {
index 13aaf12ee455caa4d4c4215aa3d2e799d2107b4c..915bdb802bc618b415cb8d36331d5b625de05f3e 100644 (file)
@@ -37,9 +37,8 @@
 
 #include "nbnxn_grid.h"
 
-#include <string.h>
-
 #include <cmath>
+#include <cstring>
 
 #include <algorithm>
 
index 66584a2300b6c8629f815830a1afb06a27f178e7..f267e71bf6b7472f8fd8368d315667dbbf6a36fb 100644 (file)
@@ -38,8 +38,7 @@
 
 #include "config.h"
 
-#include <assert.h>
-
+#include <cassert>
 #include <cmath>
 
 #include <algorithm>
index 30edc88fe8cef196e26fb401351b03c3ed513182..08539dcbeb24fe52543af30e9b876cb7f0206567 100644 (file)
 
 #include "config.h"
 
-#include <assert.h>
-#include <string.h>
-
+#include <cassert>
 #include <cmath>
+#include <cstring>
 
 #include <algorithm>
 
index 37d7d744b847cb9a49ea2ab7ff246afaa8be22b8..a7926bce9fc0f46db156b89a05a03eea403113f8 100644 (file)
 
 #include "nbnxn_tuning.h"
 
-#include <assert.h>
-#include <stdlib.h>
-
+#include <cassert>
 #include <cmath>
+#include <cstdlib>
 
 #include <algorithm>
 #include <string>
index a1b31a82eda641ef6bdc9df48bfcb4e1f92703e0..fde2b423447f668b793d3850f3770f610b2857bb 100644 (file)
 
 #include "ns.h"
 
-#include <stdlib.h>
-#include <string.h>
-
 #include <cmath>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 
index 3c664b87a8e7d4e401f620646149e3081c940b17..0712e27f63d0c55279b624ddea6e4f903feb4e03 100644 (file)
 
 #include "nsgrid.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-
 #include <cmath>
+#include <cstdio>
+#include <cstdlib>
 
 #include <algorithm>
 
index 287c97b64ac0ce5f7a5625a75b55e2bf55e1c874..465174443c62e27d4f18eaead25275e316e61809 100644 (file)
 
 #include "qm_orca.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 #include "gromacs/fileio/confio.h"
 #include "gromacs/gmxlib/network.h"
index e192cd4ac978a86d3ed7c3f15a8bf92cc2420562..5729274be1687ea9a4662a01559f6e24b20c77fd 100644 (file)
 
 #include "config.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 
@@ -971,7 +970,7 @@ real calculate_QMMM(const t_commrec  * /*unused*/,
 {
     gmx_incons("Compiled without QMMM");
 }
-t_QMMMrec *mk_QMMMrec(void)
+t_QMMMrec *mk_QMMMrec()
 {
     return nullptr;
 }
index d1ec5a14f540d5fa0afcceab7797c01f7d7c3962..aeb2a70852fe1c1264b4eec9a9810130a7390b67 100644 (file)
@@ -110,7 +110,7 @@ typedef struct t_QMMMrec {
 
 void atomic_number(int nr, char ***atomtype, int *nucnum);
 
-t_QMMMrec *mk_QMMMrec(void);
+t_QMMMrec *mk_QMMMrec();
 /* allocates memory for QMMMrec */
 
 #if !GMX_QMMM
index d0f49b146d35a8cfcc7560fa130c9e72350ea8b5..86e6db7585e1015e63863bdc06ae95230ac5d986 100644 (file)
@@ -43,7 +43,7 @@
 #include "gromacs/utility/arrayref.h"
 #include "gromacs/utility/smalloc.h"
 
-t_bin *mk_bin(void)
+t_bin *mk_bin()
 {
     t_bin *b;
 
index f76b93c9b0250ef55ec2e367404c273400acc293..129475cde5041f5483fdf7cc37601b9456e864a1 100644 (file)
@@ -48,7 +48,7 @@ typedef struct {
     double *rbuf;
 } t_bin;
 
-t_bin *mk_bin(void);
+t_bin *mk_bin();
 /* Create a real bin */
 
 void destroy_bin(t_bin *b);
index fb68c73d72637881c31b331f944384273044610d..ae85ab9e6d525bd9a00f22974fa2741ad2119dca 100644 (file)
 
 #include "settle.h"
 
-#include <assert.h>
-#include <stdio.h>
-
+#include <cassert>
 #include <cmath>
+#include <cstdio>
 
 #include <algorithm>
 
index c2c5eb4c0d56d55e8efd252cfea9ceb080c80515..e4b54384c5ba642101ca418cc2f3ac543704f45c 100644 (file)
 
 #include "shellfc.h"
 
-#include <stdlib.h>
-#include <string.h>
-
 #include <cmath>
 #include <cstdint>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 #include <array>
index a9427de077e2aedd2b7af9a6ec27c196ef0ec1b1..430edc29d8175df1ce65a1483dd9c9c7a1bb09e6 100644 (file)
@@ -123,7 +123,7 @@ static void gmx_signal(int signum)
 #endif
 }
 
-void signal_handler_install(void)
+void signal_handler_install()
 {
     if (getenv("GMX_NO_TERM") == nullptr)
     {
@@ -153,7 +153,7 @@ void signal_handler_install(void)
 #endif
 }
 
-gmx_stop_cond_t gmx_get_stop_condition(void)
+gmx_stop_cond_t gmx_get_stop_condition()
 {
     return static_cast<gmx_stop_cond_t>(stop_condition);
 }
@@ -174,12 +174,12 @@ void gmx_set_stop_condition(gmx_stop_cond_t recvd_stop_cond)
     }
 }
 
-const char *gmx_get_signal_name(void)
+const char *gmx_get_signal_name()
 {
     return gmx_signal_name[last_signal_name];
 }
 
-gmx_bool gmx_got_usr_signal(void)
+gmx_bool gmx_got_usr_signal()
 {
 #if HAVE_SIGUSR1
     gmx_bool ret = static_cast<gmx_bool>(usr_condition);
index 233399049bd1787d849ff1207e63f7739f8dc017..616dfc6c4a809851af66153ca135b7e07b68331b 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2010,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2010,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -61,20 +61,20 @@ extern const char *gmx_stop_cond_name[];
 /* the externally visible functions: */
 
 /* install the signal handlers that can set the stop condition. */
-void signal_handler_install(void);
+void signal_handler_install();
 
 /* get the current stop condition */
-gmx_stop_cond_t gmx_get_stop_condition(void);
+gmx_stop_cond_t gmx_get_stop_condition();
 
 /* set the stop condition upon receiving a remote one */
 void gmx_set_stop_condition(gmx_stop_cond_t recvd_stop_cond);
 
 /* get the signal name that lead to the current stop condition. */
-const char *gmx_get_signal_name(void);
+const char *gmx_get_signal_name();
 
 /* check whether we received a USR1 signal.
    The condition is reset once a TRUE value is returned, so this function
    only returns TRUE once for a single signal. */
-gmx_bool gmx_got_usr_signal(void);
+gmx_bool gmx_got_usr_signal();
 
 #endif
index 6673e430e774d558268ca854c2e45e6bbce29beb..d2904a05318859c834ccce0ef8f255506ae8223a 100644 (file)
 
 #include "config.h"
 
-#include <stdio.h>
-#include <string.h>
-
 #include <cmath>
 #include <cstdint>
+#include <cstdio>
+#include <cstring>
 
 #include <array>
 
index 5c5ce347658df96b930246d8812011d653aaadcc..f6ff68069ff4c8f563ebb21ffb3b8b2640061495 100644 (file)
@@ -36,8 +36,8 @@
  */
 #include "gmxpre.h"
 
-#include <stdio.h>
-#include <string.h>
+#include <cstdio>
+#include <cstring>
 
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/domdec/domdec_struct.h"
index 42ba4ea48b5e3f84f1b57285c07fbe4933d321f9..add120c3cb455325bfb0fffe72723a6b04abc65d 100644 (file)
@@ -38,9 +38,8 @@
 
 #include "update.h"
 
-#include <stdio.h>
-
 #include <cmath>
+#include <cstdio>
 
 #include <algorithm>
 
index e5085f769c7477f7fce9a6bdaae7add765494ee9..64c5d46b8aac6e4dcfab3e02a371ee680f2d88ed 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "vsite.h"
 
-#include <stdio.h>
+#include <cstdio>
 
 #include <algorithm>
 #include <vector>
index b18874a029cecca74e41ef03c8d86f3ab334cbb0..7933d2670d7bd60d9ded941508f0c57d88eef8b4 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "wall.h"
 
-#include <string.h>
+#include <cstring>
 
 #include <algorithm>
 
index 6f45539d9e6728052a49acf926a5a6bfcb6db457..7d46334cc5304bd915f260b07dc760f95982b109 100644 (file)
@@ -37,8 +37,8 @@
 /* This file is completely threadsafe - keep it that way! */
 #include "gmxpre.h"
 
-#include <stdio.h>
-#include <string.h>
+#include <cstdio>
+#include <cstring>
 
 #include <algorithm>
 
index 53085c187b880e6aea937d5ec70acdbaeaad0fb3..9a7670ae77f9c1f10142b7be6996be0fb226a11b 100644 (file)
 
 #include "config.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-
 #include <cmath>
+#include <cstdio>
+#include <cstdlib>
 
 #include <algorithm>
 #include <memory>
index 45f92de7dfa2d0d9fc494fef299332cd35af4cd5..d710abdca603add1cb3f7f26b8b6e3d6c5c40707 100644 (file)
@@ -51,7 +51,7 @@
 
 #include "handlerestart.h"
 
-#include <string.h>
+#include <cstring>
 
 #include "gromacs/commandline/filenm.h"
 #include "gromacs/fileio/checkpoint.h"
index b535cd07ac9177d7eeb7f21f4f6310f0657d838f..6068b97fc734b65c4a4ed934c8a9b31ffe9d92d2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015, by the GROMACS development team, led by
+ * Copyright (c) 2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -45,7 +45,7 @@ void init_df_history(df_history_t *dfhist, int nlambda)
     int i;
 
     dfhist->nlambda  = nlambda;
-    dfhist->bEquil   = 0;
+    dfhist->bEquil   = false;
     dfhist->wl_delta = 0;
 
     if (nlambda > 0)
@@ -137,7 +137,7 @@ void done_df_history(df_history_t *dfhist)
             sfree(dfhist->accum_m2[i]);
         }
     }
-    dfhist->bEquil   = 0;
+    dfhist->bEquil   = false;
     dfhist->nlambda  = 0;
     dfhist->wl_delta = 0;
 }
index d7905596b1410095470e17b6603c010f5878261f..ef865157070bae980eebf8e53e00fa8fec53c011 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "mshift.h"
 
-#include <string.h>
+#include <cstring>
 
 #include <algorithm>
 
index d3570c8bfe5d698e7cd721544f091a15e9d01dbb..f5f001c2f0d1fce18b588691ab45477985ac267b 100644 (file)
@@ -298,7 +298,7 @@ void calc_compact_unitcell_vertices(int ecenter, const matrix box,
  * The index consists of NCUCEDGE pairs of vertex indices.
  * The index does not change, so it needs to be retrieved only once.
  */
-int *compact_unitcell_edges(void);
+int *compact_unitcell_edges();
 
 /*! \brief Put atoms inside the simulations box
  *
index baa8c0e197232efe151a98770229ec3498944ed4..20336c6c73508ae7beec88a62a76064141d8aafe 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -38,9 +38,8 @@
 
 #include "rmpbc.h"
 
-#include <stdlib.h>
-
 #include <cmath>
+#include <cstdlib>
 
 #include <algorithm>
 
index 7336244f9c33b76272dcae0bb48adf7a22f4df87..4e3acbb65b6978c22aa2932715f5061d612cd40e 100644 (file)
 
 #include "config.h"
 
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cassert>
 #include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 
index 74fb143114d3b2a1ef1ef5e608fe37f27ca7a2b9..315433b9abc005a3e086beadd648bce68cb9111a 100644 (file)
@@ -40,9 +40,9 @@
 
 #include "config.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 
index 4c1c1a62e05b15038bc35a260871f94060a8e81f..bf96afdfa3b82b88de584d607afb0644cc1270ab 100644 (file)
@@ -38,8 +38,8 @@
 
 #include "config.h"
 
-#include <assert.h>
-#include <stdlib.h>
+#include <cassert>
+#include <cstdlib>
 
 #include "gromacs/fileio/confio.h"
 #include "gromacs/gmxlib/network.h"
index 1e9875240c9ee098005c18c143dc15d7f5b48567..87d3252881072d6029366f2845d82e9af574ecc2 100644 (file)
 
 #include "compiler.h"
 
-#include <stdarg.h>
-
 #include <cmath>
+#include <cstdarg>
 
 #include <algorithm>
 
index 79a1d1d02081fa0fdafaa70ca8873cf96fa2f46e..c5659dbb2bc36aa3ba873953a7e59c74074a2134 100644 (file)
@@ -54,7 +54,7 @@
 
 #include "evaluate.h"
 
-#include <string.h>
+#include <cstring>
 
 #include <algorithm>
 
index aebe432598b2679a264f7cf3e692909cde581c82..d7c7cd3759f99e901e582a82c7c6bb8b423eac9b 100644 (file)
@@ -43,7 +43,7 @@
 
 #include "mempool.h"
 
-#include <stdlib.h>
+#include <cstdlib>
 
 #include <new>
 
index a0263cee49ccd82604ea1b7e7ea1fb3ef104ff16..51f723bcf63db5f736d1de21c4f4bf234aa5ebd5 100644 (file)
@@ -177,7 +177,7 @@ typedef struct _gmx_sel_yypstate _gmx_sel_yypstate;
 
 int _gmx_sel_yypush_parse (_gmx_sel_yypstate *ps, int pushed_char, YYSTYPE const *pushed_val, YYLTYPE *pushed_loc, void *scanner);
 
-_gmx_sel_yypstate * _gmx_sel_yypstate_new (void);
+_gmx_sel_yypstate * _gmx_sel_yypstate_new ();
 void _gmx_sel_yypstate_delete (_gmx_sel_yypstate *ps);
 
 #endif /* !YY__GMX_SEL_YY_PARSER_H_INCLUDED  */
index aa57eb089df2a6a4dd9188a6ae1f0a40f182ee60..1a9630b81baa72aefd53ffee93f6fa1e8a449b8b 100644 (file)
@@ -1,3 +1,14 @@
+--- parser.h    2018-08-12 14:27:05.680844826 -0700
++++ parser.h    2018-08-12 14:23:36.936847674 -0700
+@@ -177,7 +177,7 @@
+
+ int _gmx_sel_yypush_parse (_gmx_sel_yypstate *ps, int pushed_char, YYSTYPE const *pushed_val, YYLTYPE *pushed_loc, void *scanner);
+
+-_gmx_sel_yypstate * _gmx_sel_yypstate_new (void);
++_gmx_sel_yypstate * _gmx_sel_yypstate_new ();
+ void _gmx_sel_yypstate_delete (_gmx_sel_yypstate *ps);
+
+ #endif /* !YY__GMX_SEL_YY_PARSER_H_INCLUDED  */
 --- parser.cpp 2014-11-03 06:56:28.000000000 +0200
 +++ parser.cpp 2014-11-03 06:57:35.000000000 +0200
 @@ -437,7 +437,7 @@
index e9f8b49960c79aa86cfba661a3f6f9783fb9f0ed..f3f16a6f821837ed79ae5c19e4716a5a54c00d72 100644 (file)
 
 #include "parsetree.h"
 
-#include <stdarg.h>
-#include <stdio.h>
+#include <cstdarg>
+#include <cstdio>
 
 #include <exception>
 
index 28f8c85118d2afd11cb21e17c7ee9263bdcff0e4..cedaf05459a1cf59ef1b5037b79877d6042884e4 100644 (file)
@@ -63,7 +63,7 @@
 
 #include "poscalc.h"
 
-#include <string.h>
+#include <cstring>
 
 #include <algorithm>
 #include <vector>
index 0e0499c98d0b79d0a7e4f8e41ffd7b8a202527e7..196c982e5ce80f87e8175603f0ab75e1f10cf11e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -43,7 +43,7 @@
 
 #include "position.h"
 
-#include <string.h>
+#include <cstring>
 
 #include "gromacs/math/vec.h"
 #include "gromacs/selection/indexutil.h"
index 56e2a77930fad170538b0f1d2ff2896347303a2d..5533d18ebdbccf191251cead899c1a3ad7ee58af 100755 (executable)
@@ -35,7 +35,7 @@ fi
     echo Generating parser.cpp and parser.h... && \
     $BISON -t -o parser.cpp --defines=parser.h parser.y && \
     patch -p0 < parser.patch && \
-    rm -f parser.cpp.orig
+    rm -f parser.cpp.orig parser.h.orig
 [[ $FORCE || scanner.l -nt scanner.cpp ]] && \
     echo Generating scanner.cpp and scanner_flex.h... && \
     $FLEX -o scanner.cpp scanner.l && \
index 86fcc1660ac11c924112a5a09124c39f665c7a89..b04366c8805b36fb9d5c069fc55fbe3e59d71d1b 100644 (file)
@@ -55,8 +55,8 @@
 
 #include "scanner_internal.h"
 
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
 
 #include <string>
 
index 3ee5a474e5e3661b91473ca6189112ff245384db..17bc002e47f546ecfef732459d730d463a4a2fed 100644 (file)
@@ -43,8 +43,8 @@
 
 #include "selmethod.h"
 
-#include <ctype.h>
-#include <stdarg.h>
+#include <cctype>
+#include <cstdarg>
 
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/cstringutil.h"
index d89a201d7657a5b105f79cfaeb67d2fbe7f5a01f..ec4beace5e3a0058ce45cc388ed3c1a9a66c790b 100644 (file)
@@ -41,8 +41,8 @@
  */
 #include "gmxpre.h"
 
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
 
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/exceptions.h"
index 5f436e41d3180c77da527de296aa794344931e6f..d1340d1d3f0e9dced11cb8a5701d8ee28704bf1e 100644 (file)
@@ -43,9 +43,9 @@
 
 #include "swapcoords.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
+#include <cstdio>
+#include <cstdlib>
+#include <ctime>
 
 #include <string>
 #include <vector>
index 4e7691bc63651783db3d403a3163ecea661d33c6..10bcbb8f500ca40a9bd0ccd97d7986310227ce46 100644 (file)
@@ -45,8 +45,8 @@
 
 #include "config.h"
 
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 #include <string>
index ad7a544e49d348ee8246e124d621e4b9df637081..dc5f518181bf6eabf374143b1d8f53f10b7402ee 100644 (file)
@@ -46,8 +46,8 @@
 
 #include "config.h"
 
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 
index 2c78e68e10f0040192cb58b9e265e54b7efbf66e..40dddfae2a0cd7e070a13b54e4d87b86db3bc8e6 100644 (file)
@@ -199,7 +199,7 @@ static __inline__ gmx_cycles_t gmx_cycles_read(void)
 }
 #elif ((defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__PATHSCALE__) || defined(__PGIC__)) && \
     (defined(__i386__) || defined(__x86_64__)) && !defined(_CRAYC))
-static __inline__ gmx_cycles_t gmx_cycles_read(void)
+static __inline__ gmx_cycles_t gmx_cycles_read()
 {
     /* x86 with GCC inline assembly - pentium TSC register */
     unsigned       low, high;
@@ -435,10 +435,10 @@ static __inline__ bool gmx_cycles_have_counter(void)
 }
 #elif ((defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__PATHSCALE__) || defined(__PGIC__) || defined(_CRAYC)) && \
     (defined(__i386__) || defined(__x86_64__)))
-static __inline__ bool gmx_cycles_have_counter(void)
+static __inline__ bool gmx_cycles_have_counter()
 {
     /* x86 or x86-64 with GCC inline assembly - pentium TSC register */
-    return 1;
+    return true;
 }
 #elif ((defined __aarch64__) && (defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__PATHSCALE__) || defined(__PGIC__)))
 static __inline bool gmx_cycles_have_counter(void)
index 2bcd5d3442f3ca6cb98a41678479c450a0142ca8..a7eeb6584629454e085d76c55c8ebd254ab81db9 100644 (file)
@@ -145,7 +145,7 @@ static const char *PMEStageNames[] =
     "PME gather",
 };
 
-gmx_bool wallcycle_have_counter(void)
+gmx_bool wallcycle_have_counter()
 {
     return gmx_cycles_have_counter();
 }
index 63e30e09faa98f80175c2db3d4bf3df8d5b7dbf6..42897a001ec7d1b706e379ea601ae701713212e1 100644 (file)
@@ -81,7 +81,7 @@ enum {
     ewcsNR
 };
 
-gmx_bool wallcycle_have_counter(void);
+gmx_bool wallcycle_have_counter();
 /* Returns if cycle counting is supported */
 
 gmx_wallcycle_t wallcycle_init(FILE *fplog, int resetstep, struct t_commrec *cr);
index e9af594dd4468249095e42dca8517791bf38fb78..e37b1b55c2a8c5e68725c68ff15afc957c44c174 100644 (file)
 
 #include "atomprop.h"
 
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-
+#include <cctype>
 #include <cmath>
+#include <cstdio>
+#include <cstring>
 
 #include "gromacs/math/utilities.h"
 #include "gromacs/topology/residuetypes.h"
index 8784374c3d96bc7a2e78b272f70f6e682eb36277..1c0c9c422fd4a406cfc816ca0b541ed43a59fd35 100644 (file)
@@ -83,7 +83,7 @@ void init_blocka(t_blocka *block)
     block->a            = nullptr;
 }
 
-t_blocka *new_blocka(void)
+t_blocka *new_blocka()
 {
     t_blocka *block;
 
index 10d30e192a7ff87f53d9e0f7947cc3e0ff79f9be..4b910f637820105b721341ae4a3f1810f13d6cf3 100644 (file)
@@ -219,7 +219,7 @@ struct t_blocka
 
 void init_block(t_block *block);
 void init_blocka(t_blocka *block);
-t_blocka *new_blocka(void);
+t_blocka *new_blocka();
 /* allocate new block */
 
 void done_block(t_block *block);
index 49a4b708d6c22b61ed72cdbbefbba90900981500..76f3a24e15d472edfbeeb5bfa9e708646036e9d4 100644 (file)
 
 #include "index.h"
 
-#include <assert.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cassert>
+#include <cctype>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 
index 2dfd10f4c13c857a301b5a7b35268a8cf59c6677..fed567e58ce4f8bc4770a46688c7890755190507 100644 (file)
 
 #include "mtop_util.h"
 
-#include <limits.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <climits>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 #include "gromacs/math/vectypes.h"
 #include "gromacs/topology/atoms.h"
index eb5693e3019020f335304a0d0588a784f06d0580..df280d257c41a9e08b64db2bb55f9ae52b5dbb1e 100644 (file)
@@ -38,8 +38,8 @@
 
 #include "symtab.h"
 
-#include <stdio.h>
-#include <string.h>
+#include <cstdio>
+#include <cstring>
 
 #include <algorithm>
 
@@ -136,7 +136,7 @@ char **get_symtab_handle(t_symtab *symtab, int name)
     gmx_fatal(FARGS, "symtab get_symtab_handle %d not found", name);
 }
 
-static t_symbuf *new_symbuf(void)
+static t_symbuf *new_symbuf()
 {
     t_symbuf *symbuf;
 
index 9cd8b1f22beff88fdffd131e1de53457905f24fe..a1c69ff649504571e4cf775d22646b2070790e8f 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "topsort.h"
 
-#include <stdio.h>
+#include <cstdio>
 
 #include "gromacs/topology/ifunc.h"
 #include "gromacs/topology/topology.h"
index 0400f388ad727317a0869d223bb2a5dbc9eb7139..7a6155af68fbadfbc1480daf4be4bb723bd6d738 100644 (file)
 
 #include "surfacearea.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 #include <algorithm>
 #include <vector>
index 4ba187e4ad8a5aa323938474fe1a85089fbb1bc3..1b7e9a5ef75a6918e7ddcd5ef76c045978d78633 100644 (file)
@@ -43,7 +43,7 @@
 
 #include "runnercommon.h"
 
-#include <string.h>
+#include <cstring>
 
 #include <algorithm>
 #include <string>
index 63ae6a2426e3f7e6aa96f897b75fe1792484a918..03d400755f34b3cf387c8676b8c3c51de98884b9 100644 (file)
@@ -132,7 +132,7 @@ static int mpi_hostname_hash()
     return hash_int;
 }
 
-int gmx_physicalnode_id_hash(void)
+int gmx_physicalnode_id_hash()
 {
     int hash = 0;
 
index 4bcccecbcb008571212700de7029bf42353cae07..545517186828cdaf643cb14bd6482bc1777a76cb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -53,7 +53,7 @@
  *
  * \ingroup module_utility
  */
-const char *gmx_version(void);
+const char *gmx_version();
 /*! \brief
  * Full git hash of the latest commit.
  *
@@ -61,7 +61,7 @@ const char *gmx_version(void);
  *
  * \ingroup module_utility
  */
-const char *gmx_version_git_full_hash(void);
+const char *gmx_version_git_full_hash();
 /*! \brief
  * Full git hash of the latest commit in a central \Gromacs repository.
  *
@@ -71,7 +71,7 @@ const char *gmx_version_git_full_hash(void);
  *
  * \ingroup module_utility
  */
-const char *gmx_version_git_central_base_hash(void);
+const char *gmx_version_git_central_base_hash();
 
 /*! \brief
  * Defined if ``libgromacs`` has been compiled in double precision.
index d0e3c095726a060771321157c7d885ca5d5bc715..4be28dfe65174fe4525bd6e27fa00932b8574022 100644 (file)
@@ -156,7 +156,7 @@ inline static bool bitmask_is_set(gmx_bitmask_t m, int b)
 inline static bool bitmask_is_disjoint(gmx_bitmask_t a, gmx_bitmask_t b)
 {
     int      i;
-    bool     r = 1;
+    bool     r = true;
     for (i = 0; i < BITMASK_ALEN; i++)
     {
         r = r && !(a[i] & b[i]);
@@ -167,7 +167,7 @@ inline static bool bitmask_is_disjoint(gmx_bitmask_t a, gmx_bitmask_t b)
 inline static bool bitmask_is_equal(gmx_bitmask_t a, gmx_bitmask_t b)
 {
     int      i;
-    bool     r = 1;
+    bool     r = true;
     for (i = 0; i < BITMASK_ALEN; i++)
     {
         r = r && (a[i] == b[i]);
@@ -178,7 +178,7 @@ inline static bool bitmask_is_equal(gmx_bitmask_t a, gmx_bitmask_t b)
 inline static bool bitmask_is_zero(gmx_bitmask_t m)
 {
     int      i;
-    bool     r = 1;
+    bool     r = true;
     for (i = 0; i < BITMASK_ALEN; i++)
     {
         r = r && !m[i];
index 94f86355a0d3329bcc3b89b6c884fcdfb493555b..6214f2599518897264c9df857cb84ae1c6a05139 100644 (file)
@@ -105,22 +105,6 @@ void cmp_uc(FILE *fp, const char *s, int index, unsigned char i1, unsigned char
 
 gmx_bool cmp_bool(FILE *fp, const char *s, int index, gmx_bool b1, gmx_bool b2)
 {
-    if (b1)
-    {
-        b1 = 1;
-    }
-    else
-    {
-        b1 = 0;
-    }
-    if (b2)
-    {
-        b2 = 1;
-    }
-    else
-    {
-        b2 = 0;
-    }
     if (b1 != b2)
     {
         if (index != -1)
index 90a90ff48012061b6f56bc88fa8fba04c2ec42b7..cb567b9bd309ac75b5bc6211ad0356919f9d6103 100644 (file)
@@ -58,7 +58,7 @@ namespace
 {
 
 //! Whether printing of cool quotes is enabled
-bool beCool(void)
+bool beCool()
 {
     /* Yes, it is bad to check the environment variable every call,
      * but we dont call this routine often, and it avoids using
index f92a4b8c1599ff8c14487536415ba613cf4c57e7..5a5b66d78e8445c0e697b70892e7762d08a084c1 100644 (file)
 
 #include "cstringutil.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-
 #include <cassert>
 #include <cctype>
+#include <cstdio>
+#include <cstdlib>
 #include <cstring>
 
 #include <string>
index 2ac9a038744bb97f91ba7686e2c795f986528da8..a98e3d01c364b802d7f7a563701b4677873c4a55 100644 (file)
 
 #include "config.h"
 
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 
 #include <fcntl.h>
 #include <sys/stat.h>
@@ -114,7 +114,7 @@ void setLibraryFileFinder(const DataFileFinder *finder)
 
 } // namespace gmx
 
-void gmx_disable_file_buffering(void)
+void gmx_disable_file_buffering()
 {
     bUnbuffered = true;
 }
index d67be901ad99ce09932d8c73c22e07dc7e8ac802..f06b502566415590a97913e0c10862e77243958e 100644 (file)
@@ -71,7 +71,7 @@ typedef int64_t    gmx_off_t;
  *
  * This only has effect on files opened with gmx_ffopen().
  */
-void gmx_disable_file_buffering(void);
+void gmx_disable_file_buffering();
 
 /*! \brief
  * Enables backups with the specified number of maximum backups.
index 6dc2d2adafce571544729f6e35d4aa390e9a14f3..20e0679253bacfebc5db73f3121b8d344eb9c8ef 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -44,8 +44,8 @@
 
 #include "config.h"
 
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
 
 #if GMX_OPENMP
 #include <omp.h>
index 7c68694125bbc60ab4a80282379feb1c2cf6541a..f329a2c8ec60e0bf459d16ae43dc5ba43face234 100644 (file)
@@ -40,9 +40,9 @@
 
 #include "config.h"
 
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
 
 #ifdef WITH_DMALLOC
 #include <dmalloc.h>
index 6d3b19e0f6116136e0d9153058db9c467b6ff1e6..4f26420267b007a95e7e4df1c0554b8a3ce21019 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2011,2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -152,7 +152,7 @@ std::string formatStringV(const char *fmt, va_list ap)
 
     // TODO: There may be a better way of doing this on Windows, Microsoft
     // provides their own way of doing things...
-    while (1)
+    while (true)
     {
         va_copy(ap_copy, ap);
         int n = vsnprintf(buf, length, fmt, ap_copy);
index 91fc69cc7764fd55dedb68852090193eb185ef62..604756df252ef85c48eae3256628f057e890f8c8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -45,8 +45,8 @@
 
 #include "config.h"
 
-#include <string.h>
-#include <time.h>
+#include <cstring>
+#include <ctime>
 
 #include <sys/types.h>
 #ifdef HAVE_SYS_TIME_H
index fedb8bb082b024bb4381346dc3c3217ab04ec878..c7a29d00087fe67ecd79003247ac8feda0c645b5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -71,13 +71,13 @@ int gmx_gethostname(char *buf, size_t len);
  *
  * Does not throw.
  */
-int gmx_getpid(void);
+int gmx_getpid();
 /*! \brief
  * Returns the current user ID, or -1 if not available.
  *
  * Does not throw.
  */
-int gmx_getuid(void);
+int gmx_getuid();
 /*! \brief
  * Gets the current user name, if available.
  *