Просмотр исходного кода

process: make pause/unpause public - see #1257

skypjack 9 месяцев назад
Родитель
Сommit
df5e57f381
1 измененных файлов с 14 добавлено и 14 удалено
  1. 14 14
      src/entt/process/process.hpp

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

@@ -134,20 +134,6 @@ protected:
         }
     }
 
-    /*! @brief Stops a process if it's running, otherwise does nothing. */
-    void pause() noexcept {
-        if(current == state::running) {
-            current = state::paused;
-        }
-    }
-
-    /*! @brief Restarts a process if it's paused, otherwise does nothing. */
-    void unpause() noexcept {
-        if(current == state::paused) {
-            current = state::running;
-        }
-    }
-
 public:
     /*! @brief Type used to provide elapsed time. */
     using delta_type = Delta;
@@ -192,6 +178,20 @@ public:
         }
     }
 
+    /*! @brief Stops a process if it's running, otherwise does nothing. */
+    void pause() noexcept {
+        if(current == state::running) {
+            current = state::paused;
+        }
+    }
+
+    /*! @brief Restarts a process if it's paused, otherwise does nothing. */
+    void unpause() noexcept {
+        if(current == state::paused) {
+            current = state::running;
+        }
+    }
+
     /**
      * @brief Returns true if a process is either running or paused.
      * @return True if the process is still alive, false otherwise.