From 92656f7e6a0d81774295276f9e367a6ef6de3bf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Kvalsvik?= Date: Wed, 18 May 2016 09:39:14 +0200 Subject: [PATCH] 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. --- opm/parser/eclipse/EclipseState/EclipseState.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/parser/eclipse/EclipseState/EclipseState.hpp b/opm/parser/eclipse/EclipseState/EclipseState.hpp index fac310174..2c1a6a408 100644 --- a/opm/parser/eclipse/EclipseState/EclipseState.hpp +++ b/opm/parser/eclipse/EclipseState/EclipseState.hpp @@ -133,7 +133,7 @@ namespace Opm { NNC m_nnc; MessageContainer m_messageContainer; - const UnitSystem& m_deckUnitSystem; + UnitSystem m_deckUnitSystem; }; typedef std::shared_ptr EclipseStatePtr;