Change Deck access methods/types to references

opm-parser#677 changes the return types for the Deck family of classes.
This patch fixes all broken code from that patch set.

https://github.com/OPM/opm-parser/pull/677
This commit is contained in:
Jørgen Kvalsvik
2016-02-09 14:36:12 +01:00
committed by lycantrophe
parent 6f3c4fb618
commit 04d605159f
8 changed files with 65 additions and 65 deletions

View File

@@ -190,9 +190,9 @@ namespace Opm{
void RelpermDiagnostics::tableCheck_(EclipseStateConstPtr eclState,
DeckConstPtr deck)
std::shared_ptr< const Deck > deck)
{
const int numSatRegions = deck->getKeyword("TABDIMS")->getRecord(0)->getItem("NTSFUN")->getInt(0);
const int numSatRegions = deck->getKeyword("TABDIMS").getRecord(0).getItem("NTSFUN").get< int >(0);
const std::string msg = "Number of saturation regions: " + std::to_string(numSatRegions) + "\n";
std::cout << msg << std::endl;
streamLog_->addMessage(Log::MessageType::Info, msg);
@@ -583,7 +583,7 @@ namespace Opm{
EclipseStateConstPtr eclState)
{
// get the number of saturation regions and the number of cells in the deck
const int numSatRegions = deck->getKeyword("TABDIMS")->getRecord(0)->getItem("NTSFUN")->getInt(0);
const int numSatRegions = deck->getKeyword("TABDIMS").getRecord(0).getItem("NTSFUN").get< int >(0);
unscaledEpsInfo_.resize(numSatRegions);
const auto tables = eclState->getTableManager();