bool taking_wait_ = false;
public:
- void operator=(const WaitStrategy& guide) { taken_wait_ = guide.taken_wait_; }
+ WaitStrategy() = default;
+ ~WaitStrategy() override = default;
+ WaitStrategy(const BasicStrategy&) = delete;
+ WaitStrategy& operator=(const WaitStrategy& guide)
+ {
+ taken_wait_ = guide.taken_wait_;
+ return *this;
+ }
bool is_transition_wait(Transition::Type type) const
{
* to decrease the count. */
void execute_next(aid_t aid, RemoteApp& app) override
{
- auto& actor = actors_to_run_.at(aid);
+ auto const& actor = actors_to_run_.at(aid);
if ((not taking_wait_) and is_transition_wait(actor.get_transition(actor.get_times_considered())->type_)) {
taken_wait_++;
taking_wait_ = true;
void consider_best() override
{
- const auto& [aid, _] = this->next_transition();
- auto actor = actors_to_run_.find(aid);
- if (actor != actors_to_run_.end()) {
+ aid_t aid = next_transition().first;
+ if (auto actor = actors_to_run_.find(aid); actor != actors_to_run_.end()) {
actor->second.mark_todo();
return;
}