diff --git a/opm/autodiff/AutoDiffHelpers.hpp b/opm/autodiff/AutoDiffHelpers.hpp index f08e1711e..97704abd5 100644 --- a/opm/autodiff/AutoDiffHelpers.hpp +++ b/opm/autodiff/AutoDiffHelpers.hpp @@ -69,7 +69,7 @@ struct HelperOps /// Constructs all helper vectors and matrices. template - HelperOps(const Grid& grid, Opm::EclipseStateConstPtr eclState = EclipseStateConstPtr (nullptr) ) + HelperOps(const Grid& grid, Opm::EclipseStateConstPtr eclState = EclipseStateConstPtr () ) { using namespace AutoDiffGrid; const int nc = numCells(grid); @@ -84,7 +84,8 @@ struct HelperOps int numNNC = 0; // handle non-neighboring connections - std::shared_ptr nnc = eclState ? eclState->getNNC() : nullptr; + std::shared_ptr nnc = eclState ? eclState->getNNC() + : std::shared_ptr(); const bool has_nnc = nnc && nnc->hasNNC(); if (has_nnc) { numNNC = nnc->numNNC();