diff --git a/opm/autodiff/StandardWells_impl.hpp b/opm/autodiff/StandardWells_impl.hpp index 17d1505ab..48c5303ae 100644 --- a/opm/autodiff/StandardWells_impl.hpp +++ b/opm/autodiff/StandardWells_impl.hpp @@ -374,10 +374,10 @@ namespace Opm return; } else { const std::vector& well_cells = wellOps().well_cells; - const int num_phases_ = wells().number_of_phases; - mob_perfcells.resize(num_phases_, ADB::null()); - b_perfcells.resize(num_phases_, ADB::null()); - for (int phase = 0; phase < num_phases_; ++phase) { + const int num_phases = wells().number_of_phases; + mob_perfcells.resize(num_phases, ADB::null()); + b_perfcells.resize(num_phases, ADB::null()); + for (int phase = 0; phase < num_phases; ++phase) { mob_perfcells[phase] = subset(rq[phase].mob, well_cells); b_perfcells[phase] = subset(rq[phase].b, well_cells); }