make items which do not have a default un-defaultable

this was a much more common problem than it seemed initially...
This commit is contained in:
Andreas Lauser
2014-11-11 15:26:18 +01:00
parent 74d2cca3a4
commit 0262b333fd
17 changed files with 101 additions and 47 deletions

View File

@@ -525,11 +525,11 @@ namespace Opm {
if (rawKeyword->isFinished()) {
DeckKeywordPtr keyword(new DeckKeyword(rawKeyword->getKeywordName()));
keyword->setLocation(rawKeyword->getFilename(), rawKeyword->getLineNR());
keyword->setDataKeyword( isDataKeyword() );
for (size_t i = 0; i < rawKeyword->size(); i++) {
DeckRecordConstPtr deckRecord = m_record->parse(rawKeyword->getRecord(i));
keyword->addRecord(deckRecord);
}
keyword->setDataKeyword( isDataKeyword() );
return keyword;
} else
throw std::invalid_argument("Tried to create a deck keyword from an incomplete raw keyword " + rawKeyword->getKeywordName());