mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #419 from blattms/prevent-init-shared_ptr-from-nullptr
Prevents initializing std::shared_ptr from nullptr to suit gcc-4.4
This commit is contained in:
commit
5b7e1a2e03
@ -69,7 +69,7 @@ struct HelperOps
|
|||||||
|
|
||||||
/// Constructs all helper vectors and matrices.
|
/// Constructs all helper vectors and matrices.
|
||||||
template<class Grid>
|
template<class Grid>
|
||||||
HelperOps(const Grid& grid, Opm::EclipseStateConstPtr eclState = EclipseStateConstPtr (nullptr) )
|
HelperOps(const Grid& grid, Opm::EclipseStateConstPtr eclState = EclipseStateConstPtr () )
|
||||||
{
|
{
|
||||||
using namespace AutoDiffGrid;
|
using namespace AutoDiffGrid;
|
||||||
const int nc = numCells(grid);
|
const int nc = numCells(grid);
|
||||||
@ -84,7 +84,8 @@ struct HelperOps
|
|||||||
int numNNC = 0;
|
int numNNC = 0;
|
||||||
|
|
||||||
// handle non-neighboring connections
|
// handle non-neighboring connections
|
||||||
std::shared_ptr<const NNC> nnc = eclState ? eclState->getNNC() : nullptr;
|
std::shared_ptr<const NNC> nnc = eclState ? eclState->getNNC()
|
||||||
|
: std::shared_ptr<const Opm::NNC>();
|
||||||
const bool has_nnc = nnc && nnc->hasNNC();
|
const bool has_nnc = nnc && nnc->hasNNC();
|
||||||
if (has_nnc) {
|
if (has_nnc) {
|
||||||
numNNC = nnc->numNNC();
|
numNNC = nnc->numNNC();
|
||||||
|
Loading…
Reference in New Issue
Block a user