Remove grid and fp members from default HandlerContext construction

This commit is contained in:
Joakim Hove
2021-01-08 10:55:46 +01:00
parent 77312b1432
commit b8ef8767e5
3 changed files with 30 additions and 12 deletions

View File

@@ -158,7 +158,7 @@ namespace {
refactoring. At the very latest this should be removed when the
Schedule refactoring is complete.
*/
const bool integration_test = true;
const bool integration_test = false;
if (integration_test) {
if (this->size() == 0)
return;
@@ -329,8 +329,22 @@ namespace {
const FieldPropsManager& fp,
std::vector<std::pair<const DeckKeyword*, std::size_t > >& rftProperties) {
HandlerContext handlerContext { block, keyword, currentStep, grid, fp };
static const std::unordered_set<std::string> require_grid = {
"COMPDAT",
"COMPSEGS"
};
HandlerContext handlerContext { block, keyword, currentStep };
/*
The grid and fieldProps members create problems for reiterating the
Schedule section. We therefor single them out very clearly here.
*/
if (require_grid.count(keyword.name()) > 0) {
handlerContext.grid_ptr = &grid;
handlerContext.fp_ptr = &fp;
}
if (handleNormalKeyword(handlerContext, parseContext, errors))
return;