use const reference instead of shared_prt.

This commit is contained in:
Liu Ming 2016-07-08 14:52:37 +08:00
parent 3f819e908d
commit daf1eb9e74
3 changed files with 5 additions and 5 deletions

View File

@ -413,7 +413,7 @@ namespace Opm
ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE }}); ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE }});
deck_ = parser->parseFile(deck_filename, parseContext); deck_ = parser->parseFile(deck_filename, parseContext);
checkDeck(deck_, parser); checkDeck(deck_, parser);
MissingFeatures::checkKeywords(deck_); MissingFeatures::checkKeywords(*deck_);
eclipse_state_.reset(new EclipseState(deck_, parseContext)); eclipse_state_.reset(new EclipseState(deck_, parseContext));
auto ioConfig = eclipse_state_->getIOConfig(); auto ioConfig = eclipse_state_->getIOConfig();
ioConfig->setOutputDir(output_dir_); ioConfig->setOutputDir(output_dir_);

View File

@ -28,7 +28,7 @@ namespace Opm {
namespace MissingFeatures { namespace MissingFeatures {
void checkKeywords(DeckConstPtr deck) void checkKeywords(const Deck& deck)
{ {
// These keywords are supported by opm-parser, but are not supported // These keywords are supported by opm-parser, but are not supported
// by flow. For some of them, only part of the options are supported. // by flow. For some of them, only part of the options are supported.
@ -57,8 +57,8 @@ namespace MissingFeatures {
"WTEST", "WTRACER", "ZIPPY2" }; "WTEST", "WTRACER", "ZIPPY2" };
// check deck and keyword for flow and parser. // check deck and keyword for flow and parser.
for (size_t idx = 0; idx < deck->size(); ++idx) { for (size_t idx = 0; idx < deck.size(); ++idx) {
const auto& keyword = deck->getKeyword(idx); const auto& keyword = deck.getKeyword(idx);
std::unordered_set<std::string>::const_iterator it; std::unordered_set<std::string>::const_iterator it;
it = unsupported_keywords.find(keyword.name()); it = unsupported_keywords.find(keyword.name());
if (it != unsupported_keywords.end()) { if (it != unsupported_keywords.end()) {

View File

@ -24,7 +24,7 @@ namespace Opm {
namespace MissingFeatures { namespace MissingFeatures {
void checkKeywords(std::shared_ptr<const Deck> deck); void checkKeywords(const Deck& deck);
} }