Kaynağa Gözat

scheduler: remove unnecessary template parameter

Michele Caini 7 ay önce
ebeveyn
işleme
357ee3f994

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

@@ -144,12 +144,10 @@ public:
 
     /**
      * @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.
      */
-    template<typename Proc>
-    type &attach(std::shared_ptr<Proc> proc) {
+    type &attach(std::shared_ptr<type> proc) {
         ENTT_ASSERT(proc, "Null process not allowed");
         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::scheduler scheduler{};
 
-    ASSERT_DEATH(scheduler.attach<succeeded_process>(nullptr), "");
+    ASSERT_DEATH(scheduler.attach(nullptr), "");
 }
 
 TEST(Scheduler, Functor) {