From: SUTER Frederic Date: Mon, 20 Dec 2021 20:08:21 +0000 (+0100) Subject: allowed to do that in this state too X-Git-Tag: v3.30~229 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/398acb7d92abe28e7e870d78c013dfd7f66b205c allowed to do that in this state too --- diff --git a/src/s4u/s4u_Activity.cpp b/src/s4u/s4u_Activity.cpp index 7ed82645e7..b5c7478961 100644 --- a/src/s4u/s4u_Activity.cpp +++ b/src/s4u/s4u_Activity.cpp @@ -118,7 +118,8 @@ double Activity::get_remaining() const Activity* Activity::set_remaining(double remains) { - xbt_assert(state_ == State::INITED, "Cannot change the remaining amount of work once the Activity is started"); + xbt_assert(state_ == State::INITED || state_ == State::STARTING, + "Cannot change the remaining amount of work once the Activity is started"); remains_ = remains; return this; }