X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fa33c62c831c17237ac38960b24596560ad3804d..3f9b311ec56db95ec539001a860ae3c838c48312:/src/mc/api/strategy/BasicStrategy.hpp diff --git a/src/mc/api/strategy/BasicStrategy.hpp b/src/mc/api/strategy/BasicStrategy.hpp index de0fe65d9b..ca44509880 100644 --- a/src/mc/api/strategy/BasicStrategy.hpp +++ b/src/mc/api/strategy/BasicStrategy.hpp @@ -31,7 +31,7 @@ public: "--cfg=model-check/max-depth. Here are the 100 first trace elements", _sg_mc_max_depth.get()); auto trace = Exploration::get_instance()->get_textual_trace(100); - for (auto elm : trace) + for (auto const& elm : trace) XBT_CERROR(mc_dfs, " %s", elm.c_str()); xbt_die("Aborting now."); } @@ -40,11 +40,10 @@ public: ~BasicStrategy() override = default; std::pair best_transition(bool must_be_todo) const override { - for (auto const& [aid, actor] : actors_to_run_) { - /* Only consider actors (1) marked as interleaving by the checker and (2) currently enabled in the application */ - if ((not actor.is_todo() && must_be_todo) || not actor.is_enabled() || actor.is_done()) { + for (auto const& [aid, actor] : actors_to_run_) { + /* Only consider actors (1) marked as interleaving by the checker and (2) currently enabled in the application */ + if ((not actor.is_todo() && must_be_todo) || not actor.is_enabled() || actor.is_done()) continue; - } return std::make_pair(aid, depth_); }