|
@@ -4,7 +4,6 @@
|
|
|
#include <cstdint>
|
|
#include <cstdint>
|
|
|
#include <type_traits>
|
|
#include <type_traits>
|
|
|
#include <utility>
|
|
#include <utility>
|
|
|
-#include "../config/config.h"
|
|
|
|
|
|
|
|
|
|
namespace entt {
|
|
namespace entt {
|
|
|
|
|
|
|
@@ -110,7 +109,7 @@ class process {
|
|
|
static_cast<Target *>(this)->aborted();
|
|
static_cast<Target *>(this)->aborted();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- void next(...) const ENTT_NOEXCEPT {}
|
|
|
|
|
|
|
+ void next(...) const noexcept {}
|
|
|
|
|
|
|
|
protected:
|
|
protected:
|
|
|
/**
|
|
/**
|
|
@@ -119,7 +118,7 @@ protected:
|
|
|
* The function is idempotent and it does nothing if the process isn't
|
|
* The function is idempotent and it does nothing if the process isn't
|
|
|
* alive.
|
|
* alive.
|
|
|
*/
|
|
*/
|
|
|
- void succeed() ENTT_NOEXCEPT {
|
|
|
|
|
|
|
+ void succeed() noexcept {
|
|
|
if(alive()) {
|
|
if(alive()) {
|
|
|
current = state::succeeded;
|
|
current = state::succeeded;
|
|
|
}
|
|
}
|
|
@@ -131,7 +130,7 @@ protected:
|
|
|
* The function is idempotent and it does nothing if the process isn't
|
|
* The function is idempotent and it does nothing if the process isn't
|
|
|
* alive.
|
|
* alive.
|
|
|
*/
|
|
*/
|
|
|
- void fail() ENTT_NOEXCEPT {
|
|
|
|
|
|
|
+ void fail() noexcept {
|
|
|
if(alive()) {
|
|
if(alive()) {
|
|
|
current = state::failed;
|
|
current = state::failed;
|
|
|
}
|
|
}
|
|
@@ -143,7 +142,7 @@ protected:
|
|
|
* The function is idempotent and it does nothing if the process isn't
|
|
* The function is idempotent and it does nothing if the process isn't
|
|
|
* running.
|
|
* running.
|
|
|
*/
|
|
*/
|
|
|
- void pause() ENTT_NOEXCEPT {
|
|
|
|
|
|
|
+ void pause() noexcept {
|
|
|
if(current == state::running) {
|
|
if(current == state::running) {
|
|
|
current = state::paused;
|
|
current = state::paused;
|
|
|
}
|
|
}
|
|
@@ -155,7 +154,7 @@ protected:
|
|
|
* The function is idempotent and it does nothing if the process isn't
|
|
* The function is idempotent and it does nothing if the process isn't
|
|
|
* paused.
|
|
* paused.
|
|
|
*/
|
|
*/
|
|
|
- void unpause() ENTT_NOEXCEPT {
|
|
|
|
|
|
|
+ void unpause() noexcept {
|
|
|
if(current == state::paused) {
|
|
if(current == state::paused) {
|
|
|
current = state::running;
|
|
current = state::running;
|
|
|
}
|
|
}
|
|
@@ -166,7 +165,7 @@ public:
|
|
|
using delta_type = Delta;
|
|
using delta_type = Delta;
|
|
|
|
|
|
|
|
/*! @brief Default destructor. */
|
|
/*! @brief Default destructor. */
|
|
|
- virtual ~process() ENTT_NOEXCEPT {
|
|
|
|
|
|
|
+ virtual ~process() noexcept {
|
|
|
static_assert(std::is_base_of_v<process, Derived>, "Incorrect use of the class template");
|
|
static_assert(std::is_base_of_v<process, Derived>, "Incorrect use of the class template");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -192,7 +191,7 @@ public:
|
|
|
* @brief Returns true if a process is either running or paused.
|
|
* @brief Returns true if a process is either running or paused.
|
|
|
* @return True if the process is still alive, false otherwise.
|
|
* @return True if the process is still alive, false otherwise.
|
|
|
*/
|
|
*/
|
|
|
- [[nodiscard]] bool alive() const ENTT_NOEXCEPT {
|
|
|
|
|
|
|
+ [[nodiscard]] bool alive() const noexcept {
|
|
|
return current == state::running || current == state::paused;
|
|
return current == state::running || current == state::paused;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -200,7 +199,7 @@ public:
|
|
|
* @brief Returns true if a process is already terminated.
|
|
* @brief Returns true if a process is already terminated.
|
|
|
* @return True if the process is terminated, false otherwise.
|
|
* @return True if the process is terminated, false otherwise.
|
|
|
*/
|
|
*/
|
|
|
- [[nodiscard]] bool finished() const ENTT_NOEXCEPT {
|
|
|
|
|
|
|
+ [[nodiscard]] bool finished() const noexcept {
|
|
|
return current == state::finished;
|
|
return current == state::finished;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -208,7 +207,7 @@ public:
|
|
|
* @brief Returns true if a process is currently paused.
|
|
* @brief Returns true if a process is currently paused.
|
|
|
* @return True if the process is paused, false otherwise.
|
|
* @return True if the process is paused, false otherwise.
|
|
|
*/
|
|
*/
|
|
|
- [[nodiscard]] bool paused() const ENTT_NOEXCEPT {
|
|
|
|
|
|
|
+ [[nodiscard]] bool paused() const noexcept {
|
|
|
return current == state::paused;
|
|
return current == state::paused;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -216,7 +215,7 @@ public:
|
|
|
* @brief Returns true if a process terminated with errors.
|
|
* @brief Returns true if a process terminated with errors.
|
|
|
* @return True if the process terminated with errors, false otherwise.
|
|
* @return True if the process terminated with errors, false otherwise.
|
|
|
*/
|
|
*/
|
|
|
- [[nodiscard]] bool rejected() const ENTT_NOEXCEPT {
|
|
|
|
|
|
|
+ [[nodiscard]] bool rejected() const noexcept {
|
|
|
return current == state::rejected;
|
|
return current == state::rejected;
|
|
|
}
|
|
}
|
|
|
|
|
|