From df5e57f381685de77b79b3c436b9db6e7d7563ea Mon Sep 17 00:00:00 2001 From: skypjack Date: Wed, 4 Jun 2025 19:04:56 +0200 Subject: [PATCH] process: make pause/unpause public - see #1257 --- src/entt/process/process.hpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/entt/process/process.hpp b/src/entt/process/process.hpp index 12470ec0e..a81004b1e 100644 --- a/src/entt/process/process.hpp +++ b/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.