diff --git a/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp b/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp index 8f37a7df2..2fc23d288 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp @@ -1178,23 +1178,24 @@ namespace Opm { void Schedule::handleMESSAGES( const DeckKeyword& keyword, size_t currentStep) { const auto& record = keyword.getRecord(0); using set_limit_fptr = decltype( std::mem_fn( &MessageLimits::setMessagePrintLimit ) ); - static const std::pair setters[] = {{"MESSAGE_PRINT_LIMIT" , std::mem_fn( &MessageLimits::setMessagePrintLimit)}, - {"COMMENT_PRINT_LIMIT" , std::mem_fn( &MessageLimits::setCommentPrintLimit)}, - {"WARNING_PRINT_LIMIT" , std::mem_fn( &MessageLimits::setWarningPrintLimit)}, - {"PROBLEM_PRINT_LIMIT" , std::mem_fn( &MessageLimits::setProblemPrintLimit)}, - {"ERROR_PRINT_LIMIT" , std::mem_fn( &MessageLimits::setErrorPrintLimit)}, - {"BUG_PRINT_LIMIT" , std::mem_fn( &MessageLimits::setBugPrintLimit)}, - {"MESSAGE_STOP_LIMIT" , std::mem_fn( &MessageLimits::setMessageStopLimit)}, - {"COMMENT_STOP_LIMIT" , std::mem_fn( &MessageLimits::setCommentStopLimit)}, - {"WARNING_STOP_LIMIT" , std::mem_fn( &MessageLimits::setWarningStopLimit)}, - {"PROBLEM_STOP_LIMIT" , std::mem_fn( &MessageLimits::setProblemStopLimit)}, - {"ERROR_STOP_LIMIT" , std::mem_fn( &MessageLimits::setErrorStopLimit)}, - {"BUG_STOP_LIMIT" , std::mem_fn( &MessageLimits::setBugStopLimit)}}; + static const std::pair setters[] = { + {"MESSAGE_PRINT_LIMIT" , std::mem_fn( &MessageLimits::setMessagePrintLimit)}, + {"COMMENT_PRINT_LIMIT" , std::mem_fn( &MessageLimits::setCommentPrintLimit)}, + {"WARNING_PRINT_LIMIT" , std::mem_fn( &MessageLimits::setWarningPrintLimit)}, + {"PROBLEM_PRINT_LIMIT" , std::mem_fn( &MessageLimits::setProblemPrintLimit)}, + {"ERROR_PRINT_LIMIT" , std::mem_fn( &MessageLimits::setErrorPrintLimit)}, + {"BUG_PRINT_LIMIT" , std::mem_fn( &MessageLimits::setBugPrintLimit)}, + {"MESSAGE_STOP_LIMIT" , std::mem_fn( &MessageLimits::setMessageStopLimit)}, + {"COMMENT_STOP_LIMIT" , std::mem_fn( &MessageLimits::setCommentStopLimit)}, + {"WARNING_STOP_LIMIT" , std::mem_fn( &MessageLimits::setWarningStopLimit)}, + {"PROBLEM_STOP_LIMIT" , std::mem_fn( &MessageLimits::setProblemStopLimit)}, + {"ERROR_STOP_LIMIT" , std::mem_fn( &MessageLimits::setErrorStopLimit)}, + {"BUG_STOP_LIMIT" , std::mem_fn( &MessageLimits::setBugStopLimit)}}; for (const auto& pair : setters) { const auto& item = record.getItem( pair.first ); if (!item.defaultApplied(0)) { - set_limit_fptr fptr = pair.second; + const set_limit_fptr& fptr = pair.second; int value = item.get(0); fptr( this->m_messageLimits , currentStep , value ); }