mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-27 09:40:59 -06:00
changed: avoid lambda capture
clang warns it's not necessary to use a capture for this. i opted to make it constexpr and avoid the capture with gcc as well.
This commit is contained in:
parent
9751b78992
commit
133856b943
@ -2390,14 +2390,14 @@ guideRateUpdateIsNeeded(const int reportStepIdx) const {
|
||||
});
|
||||
if (!need_update && this->report_step_starts_) {
|
||||
const auto& events = this->schedule()[reportStepIdx].wellgroup_events();
|
||||
const auto effective_events_mask = ScheduleEvents::WELL_STATUS_CHANGE
|
||||
constexpr auto effective_events_mask = ScheduleEvents::WELL_STATUS_CHANGE
|
||||
+ ScheduleEvents::INJECTION_TYPE_CHANGED
|
||||
+ ScheduleEvents::WELL_SWITCHED_INJECTOR_PRODUCER
|
||||
+ ScheduleEvents::NEW_WELL;
|
||||
|
||||
need_update = std::any_of(this->well_container_generic_.begin(),
|
||||
this->well_container_generic_.end(),
|
||||
[&events, effective_events_mask](const WellInterfaceGeneric* well)
|
||||
[&events](const WellInterfaceGeneric* well)
|
||||
{
|
||||
return events.hasEvent(well->name(), effective_events_mask);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user