reduce scope of variables to avoid dead store warnings
This commit is contained in:
parent
5ab4c3dfa0
commit
237b63e674
@ -321,10 +321,11 @@ void RstState::add_actions(const Parser& parser,
|
||||
for (std::size_t icond = 0; icond < actdims.max_conditions(); icond++) {
|
||||
const auto zacn_offset = index * zacn_action_size + icond * zacn_cond_size;
|
||||
const auto iacn_offset = index * iacn_action_size + icond * iacn_cond_size;
|
||||
const auto sacn_offset = index * sacn_action_size + icond * sacn_cond_size;
|
||||
|
||||
if (RstAction::Condition::valid(&zacn[zacn_offset], &iacn[iacn_offset]))
|
||||
if (RstAction::Condition::valid(&zacn[zacn_offset], &iacn[iacn_offset])) {
|
||||
const auto sacn_offset = index * sacn_action_size + icond * sacn_cond_size;
|
||||
conditions.emplace_back(&zacn[zacn_offset], &iacn[iacn_offset], &sacn[sacn_offset]);
|
||||
}
|
||||
}
|
||||
|
||||
const auto& name = zact[index * zact_action_size + 0];
|
||||
|
@ -130,8 +130,6 @@ void compareErtData(const std::vector<int> &src, const std::vector<int> &dst)
|
||||
void checkEgridFile( const EclipseGrid& eclGrid ) {
|
||||
auto egridFile = EclIO::EGrid("FOO.EGRID");
|
||||
|
||||
const auto numCells = eclGrid.getNX() * eclGrid.getNY() * eclGrid.getNZ();
|
||||
|
||||
{
|
||||
const auto& coord = egridFile.get<float>("COORD");
|
||||
const auto& expect = eclGrid.getCOORD();
|
||||
@ -148,8 +146,10 @@ void checkEgridFile( const EclipseGrid& eclGrid ) {
|
||||
const auto& actnum = egridFile.get<int>("ACTNUM");
|
||||
auto expect = eclGrid.getACTNUM();
|
||||
|
||||
if (expect.empty())
|
||||
if (expect.empty()) {
|
||||
const auto numCells = eclGrid.getNX() * eclGrid.getNY() * eclGrid.getNZ();
|
||||
expect.assign(numCells, 1);
|
||||
}
|
||||
|
||||
compareErtData(expect, actnum);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user