Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Various sonar cleanups
[simgrid.git] / src / mc / transition / TransitionRandom.cpp
index 81eab72..7470be2 100644 (file)
@@ -25,12 +25,9 @@ RandomTransition::RandomTransition(aid_t issuer, int times_considered, std::stri
 
 bool RandomTransition::reversible_race(const Transition* other) const
 {
-  switch (type_) {
-    case Type::RANDOM:
-      return true; // Random is always enabled
-    default:
-      xbt_die("Unexpected transition type %s", to_c_str(type_));
-  }
+  xbt_assert(type_ == Type::RANDOM, "Unexpected transition type %s", to_c_str(type_));
+
+  return true; // Random is always enabled
 }
 
 } // namespace simgrid::mc