Browse Source

scheduler: remove unnecessary template parameter

Michele Caini 7 months ago
parent
commit
357ee3f994
2 changed files with 3 additions and 5 deletions
  1. 2 4
      src/entt/process/scheduler.hpp
  2. 1 1
      test/entt/process/scheduler.cpp

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

@@ -144,12 +144,10 @@ public:
 
 
     /**
     /**
      * @brief Schedules a process for the next tick.
      * @brief Schedules a process for the next tick.
-     * @tparam Proc Type of process to schedule.
-     * @param proc The actual process to schedule.
+     * @param proc a process to schedule.
      * @return A reference to the newly assigned process.
      * @return A reference to the newly assigned process.
      */
      */
-    template<typename Proc>
-    type &attach(std::shared_ptr<Proc> proc) {
+    type &attach(std::shared_ptr<type> proc) {
         ENTT_ASSERT(proc, "Null process not allowed");
         ENTT_ASSERT(proc, "Null process not allowed");
         return *handlers.first().emplace_back(std::move(proc));
         return *handlers.first().emplace_back(std::move(proc));
     }
     }

+ 1 - 1
test/entt/process/scheduler.cpp

@@ -135,7 +135,7 @@ TEST(Scheduler, AttachThen) {
 ENTT_DEBUG_TEST(SchedulerDeathTest, Attach) {
 ENTT_DEBUG_TEST(SchedulerDeathTest, Attach) {
     entt::scheduler scheduler{};
     entt::scheduler scheduler{};
 
 
-    ASSERT_DEATH(scheduler.attach<succeeded_process>(nullptr), "");
+    ASSERT_DEATH(scheduler.attach(nullptr), "");
 }
 }
 
 
 TEST(Scheduler, Functor) {
 TEST(Scheduler, Functor) {