Merge pull request #394 from akva2/c++20_stuff

Mark comparison operator const and avoid arithmetics using enums
This commit is contained in:
Bård Skaflestad 2024-11-06 10:10:39 +01:00 committed by GitHub
commit fa782c05f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -479,7 +479,7 @@ namespace Opm {
/// @param [in] m
/// Assignment right hand side.
template <template<typename> class OtherSP, class OtherOP>
bool operator==(const FullMatrix<T, OtherSP, OtherOP>& m)
bool operator==(const FullMatrix<T, OtherSP, OtherOP>& m) const
{
if (numRows() != m.numRows() || numCols() != m.numCols()) {
return false;

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;