diff --git a/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.cpp b/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.cpp index 5a48d0390..fe296b4da 100644 --- a/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.cpp +++ b/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.cpp @@ -35,20 +35,12 @@ namespace Opm { return Equil( deck.getKeyword( ) ); } + InitConfig::InitConfig(DeckConstPtr deck) : InitConfig(*deck) {} - InitConfig::InitConfig(DeckConstPtr deck) : - InitConfig(*deck) - {} - - InitConfig::InitConfig(const Deck& deck) : equil( equils( deck ) ) { - m_restartRequested = false; - m_restartStep = 0; - m_restartRootName = ""; - + InitConfig::InitConfig(const Deck& deck) : equil(equils(deck)) { initRestartKW(deck); } - void InitConfig::setRestart( const std::string& root, int step) { m_restartRequested = true; m_restartStep = step; @@ -73,7 +65,7 @@ namespace Opm { setRestart( root , step ); } - } else if (deck->hasKeyword()) + } else if (deck.hasKeyword()) throw std::runtime_error("Error in deck: Can not supply SKIPREST keyword without a preceeding RESTART."); } diff --git a/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp b/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp index 4d747fa1c..b783fc15c 100644 --- a/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp +++ b/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp @@ -43,8 +43,8 @@ namespace Opm { private: void initRestartKW(const Deck& deck); - bool m_restartRequested; - int m_restartStep; + bool m_restartRequested = false; + int m_restartStep = 0; std::string m_restartRootName; Equil equil;