From: ejjordan Date: Tue, 4 May 2021 08:13:32 +0000 (+0200) Subject: Preven extension of DDBondedChecking X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=5662c9e130d3d3486a18cf320f1e291abe260ffe;p=alexxy%2Fgromacs.git Preven extension of DDBondedChecking By having DDBondedChecking inherit from bool, any attempt to add additional enum values will lead to compilation error, unless the inheritance is also removed. --- diff --git a/src/gromacs/domdec/domdec.h b/src/gromacs/domdec/domdec.h index b969eab476..42883d1598 100644 --- a/src/gromacs/domdec/domdec.h +++ b/src/gromacs/domdec/domdec.h @@ -94,7 +94,7 @@ class RangePartitioning; class VirtualSitesHandler; template class ArrayRef; -enum class DDBondedChecking; +enum class DDBondedChecking : bool; } // namespace gmx /*! \brief Returns the global topology atom number belonging to local atom index i. diff --git a/src/gromacs/domdec/options.h b/src/gromacs/domdec/options.h index 2f6e858f92..6d5b29174b 100644 --- a/src/gromacs/domdec/options.h +++ b/src/gromacs/domdec/options.h @@ -76,10 +76,10 @@ enum class DlbOption /*! \brief Options for checking bonded interactions. * * These values must match the bool false and true used for mdrun -ddcheck */ -enum class DDBondedChecking +enum class DDBondedChecking : bool { - ExcludeZeroLimit = 0, //!< Do not check bonded interactions that go to 0 for large distances - All = 1 //!< Check all bonded interactions + ExcludeZeroLimit = false, //!< Do not check bonded interactions that go to 0 for large distances + All = true //!< Check all bonded interactions }; /*! \libinternal \brief Structure containing all (command line) options for the domain decomposition */