diff --git a/opm/autodiff/FlowMainEbos.hpp b/opm/autodiff/FlowMainEbos.hpp index e3249ac82..6dbb16c16 100755 --- a/opm/autodiff/FlowMainEbos.hpp +++ b/opm/autodiff/FlowMainEbos.hpp @@ -241,7 +241,7 @@ namespace Opm // Throws std::runtime_error if failed to create (if requested) output dir. void setupOutput() { - std::string output = param_.getDefault("output", std::string("all")); + const std::string output = param_.getDefault("output", std::string("all")); static std::map string2OutputEnum = { {"none", OUTPUT_NONE }, {"false", OUTPUT_LOG_ONLY }, @@ -255,7 +255,9 @@ namespace Opm } else { - std::cerr<<"Value "< OUTPUT_NONE; diff --git a/opm/autodiff/SimulatorFullyImplicitBlackoilOutput.hpp b/opm/autodiff/SimulatorFullyImplicitBlackoilOutput.hpp index 73348009a..ea2278cf9 100644 --- a/opm/autodiff/SimulatorFullyImplicitBlackoilOutput.hpp +++ b/opm/autodiff/SimulatorFullyImplicitBlackoilOutput.hpp @@ -340,12 +340,9 @@ namespace Opm const Opm::PhaseUsage &phaseUsage) : output_( [¶m](){ // If output parameter is true or all, then we do output - std::string outputString = param.getDefault("output", std::string("all")); - if ( outputString == "all" || outputString == "true" ) - { - return true; - } - return false;}() + const std::string outputString = param.getDefault("output", std::string("all")); + return ( outputString == "all" || outputString == "true" ); + }() ), parallelOutput_( output_ ? new ParallelDebugOutput< Grid >( grid, eclipseState, phaseUsage.num_phases, phaseUsage ) : 0 ), outputDir_( eclipseState.getIOConfig().getOutputDir() ),