Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git] / src / s4u / s4u_Activity.cpp
index 4c1b9e4123ec9ce72fcce5cb32efcc1d702562cd..55bba1e56ffe90031e6a051732df913cd22a5610 100644 (file)
@@ -67,23 +67,7 @@ Activity* Activity::resume()
 
 const char* Activity::get_state_str() const
 {
-  switch (state_) {
-    case State::INITED:
-      return "INITED";
-
-    case State::STARTING:
-      return "STARTING";
-
-    case State::STARTED:
-      return "STARTED";
-
-    case State::CANCELED:
-      return "CANCELED";
-
-    case State::FINISHED:
-      return "FINISHED";
-  }
-  THROW_IMPOSSIBLE;
+  return to_c_str(state_);
 }
 
 double Activity::get_remaining() const