Correctly mark transfer of ownership for ouptut writer

This commit is contained in:
Markus Blatt 2016-11-10 12:41:13 +01:00
parent 077dc02481
commit 3eba3353d0
3 changed files with 6 additions and 6 deletions

View File

@ -245,7 +245,7 @@ try
::createEclipseGrid( cGrid ,
eclipseState->getInputGrid())));
Opm::BlackoilOutputWriter
outputWriter(cGrid, param, *eclipseState, eclipseWriter, pu,
outputWriter(cGrid, param, *eclipseState, std::move(eclipseWriter), pu,
new_props->permeability() );
SimulatorReport fullReport;

View File

@ -773,7 +773,7 @@ namespace Opm
output_writer_.reset(new BlackoilOutputWriter(grid_init_->grid(),
param_,
*eclipse_state_,
eclipse_writer_,
std::move(eclipse_writer_),
Opm::phaseUsageFromDeck(*deck_),
fluidprops_->permeability()));
}

View File

@ -214,7 +214,7 @@ namespace Opm
BlackoilOutputWriter(const Grid& grid,
const parameter::ParameterGroup& param,
const Opm::EclipseState& eclipseState,
std::unique_ptr<EclipseWriter>& eclWriter,
std::unique_ptr<EclipseWriter>&& eclWriter,
const Opm::PhaseUsage &phaseUsage,
const double* permeability );
@ -329,7 +329,7 @@ namespace Opm
BlackoilOutputWriter(const Grid& grid,
const parameter::ParameterGroup& param,
const Opm::EclipseState& eclipseState,
std::unique_ptr<EclipseWriter>& eclWriter,
std::unique_ptr<EclipseWriter>&& eclWriter,
const Opm::PhaseUsage &phaseUsage,
const double* permeability )
: output_( param.getDefault("output", true) ),
@ -345,8 +345,8 @@ namespace Opm
new BlackoilMatlabWriter< Grid >( grid, outputDir_ ) : 0 ),
eclWriter_( output_ && parallelOutput_->isIORank() &&
param.getDefault("output_ecl", true) ?
eclWriter.release()
: 0 ),
std::move(eclWriter)
: std::move(std::unique_ptr<EclipseWriter>()) ),
eclipseState_(eclipseState),
asyncOutput_()
{