Răsfoiți Sursa

process: minor changes

skypjack 10 luni în urmă
părinte
comite
2f5b25b189
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      src/entt/process/process.hpp

+ 2 - 2
src/entt/process/process.hpp

@@ -140,14 +140,14 @@ public:
 
     /*! @brief Stops a process if it's running, otherwise does nothing. */
     void pause() noexcept {
-        if(current == state::running) {
+        if(alive()) {
             current = state::paused;
         }
     }
 
     /*! @brief Restarts a process if it's paused, otherwise does nothing. */
     void unpause() noexcept {
-        if(current == state::paused) {
+        if(alive()) {
             current = state::running;
         }
     }