make ParserKeyword::matches only return true if the deck keyword name is valid

This commit is contained in:
Andreas Lauser 2014-06-27 16:31:59 +02:00
parent fe638c2fc8
commit f6689d838e

View File

@ -521,7 +521,9 @@ namespace Opm {
}
bool ParserKeyword::matches(const std::string& deckKeywordName) const {
if (m_deckNames.count(deckKeywordName) > 0)
if (!validDeckName(deckKeywordName))
return false;
else if (m_deckNames.count(deckKeywordName) > 0)
return true;
else if (hasMatchRegex())
return boost::regex_match(deckKeywordName, m_matchRegex);