changed: use constexpr instead of anonymous enums

c++-20 warns for arithmetics using enums
This commit is contained in:
Arne Morten Kvarving 2024-11-06 09:54:26 +01:00
parent 25e10dc710
commit 1b4657db89
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ namespace Opm {
public:
/// @brief
/// The number of space dimensions.
enum { dim = GridInterface::Dimension };
static constexpr int dim = GridInterface::Dimension;
/// @brief
/// The iterator type for iterating over grid cells.
typedef typename GridInterface::CellIterator CellIter;

View File

@ -86,7 +86,7 @@ namespace Opm {
public:
/// @brief
/// The number of space dimensions.
enum { dim = GridInterface::Dimension };
static constexpr int dim = GridInterface::Dimension;
/// @brief
/// The iterator type for iterating over grid cells.
typedef typename GridInterface::CellIterator CellIter;