Browse Source

process: prepare to remove ENTT_NOEXCEPT[_IF]

Michele Caini 3 years ago
parent
commit
cb02f0621c
2 changed files with 13 additions and 15 deletions
  1. 10 11
      src/entt/process/process.hpp
  2. 3 4
      src/entt/process/scheduler.hpp

+ 10 - 11
src/entt/process/process.hpp

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

+ 3 - 4
src/entt/process/scheduler.hpp

@@ -7,7 +7,6 @@
 #include <type_traits>
 #include <utility>
 #include <vector>
-#include "../config/config.h"
 #include "process.hpp"
 
 namespace entt {
@@ -53,7 +52,7 @@ class scheduler {
     };
 
     struct continuation {
-        continuation(process_handler *ref) ENTT_NOEXCEPT
+        continuation(process_handler *ref) noexcept
             : handler{ref} {}
 
         template<typename Proc, typename... Args>
@@ -122,7 +121,7 @@ public:
      * @brief Number of processes currently scheduled.
      * @return Number of processes currently scheduled.
      */
-    [[nodiscard]] size_type size() const ENTT_NOEXCEPT {
+    [[nodiscard]] size_type size() const noexcept {
         return handlers.size();
     }
 
@@ -130,7 +129,7 @@ public:
      * @brief Returns true if at least a process is currently scheduled.
      * @return True if there are scheduled processes, false otherwise.
      */
-    [[nodiscard]] bool empty() const ENTT_NOEXCEPT {
+    [[nodiscard]] bool empty() const noexcept {
         return handlers.empty();
     }