EclipseState stores copy of Deck's UnitSystem

With the introduction of Parser::parse methods and the relaxed lifetime
requirement of Deck (i.e. users no longer need to keep a Deck instance
around for EclipseState to be considered valid), the UnitSystem cannot
be a reference, but must rather be stored.

Since the unit system is immutable once the deck is read this is
unproblematic. It's also small and cheap to copy.
This commit is contained in:
Jørgen Kvalsvik
2016-05-18 09:39:14 +02:00
parent 64fe528f6d
commit 92656f7e6a

View File

@@ -133,7 +133,7 @@ namespace Opm {
NNC m_nnc;
MessageContainer m_messageContainer;
const UnitSystem& m_deckUnitSystem;
UnitSystem m_deckUnitSystem;
};
typedef std::shared_ptr<EclipseState> EclipseStatePtr;