diff --git a/osal/linux/PeriodicPosixTask.cpp b/osal/linux/PeriodicPosixTask.cpp index c05f1030..d68576cb 100644 --- a/osal/linux/PeriodicPosixTask.cpp +++ b/osal/linux/PeriodicPosixTask.cpp @@ -21,8 +21,7 @@ void* PeriodicPosixTask::taskEntryPoint(void* arg) { return NULL; } -ReturnValue_t PeriodicPosixTask::addComponent(object_id_t object, - bool addTaskIF) { +ReturnValue_t PeriodicPosixTask::addComponent(object_id_t object) { ExecutableObjectIF* newObject = objectManager->get( object); if (newObject == nullptr) { @@ -30,9 +29,8 @@ ReturnValue_t PeriodicPosixTask::addComponent(object_id_t object, } objectList.push_back(newObject); - if(setTaskIF) { - newObject->setTaskIF(this); - } + newObject->setTaskIF(this); + return HasReturnvaluesIF::RETURN_OK; } diff --git a/osal/linux/PeriodicPosixTask.h b/osal/linux/PeriodicPosixTask.h index bf1a995b..b194733b 100644 --- a/osal/linux/PeriodicPosixTask.h +++ b/osal/linux/PeriodicPosixTask.h @@ -39,8 +39,7 @@ public: * @param object Id of the object to add. * @return RETURN_OK on success, RETURN_FAILED if the object could not be added. */ - ReturnValue_t addComponent(object_id_t object, - bool addTaskIF = true) override; + ReturnValue_t addComponent(object_id_t object) override; uint32_t getPeriodMs() const override; diff --git a/tasks/PeriodicTaskIF.h b/tasks/PeriodicTaskIF.h index 6f490977..f54d6155 100644 --- a/tasks/PeriodicTaskIF.h +++ b/tasks/PeriodicTaskIF.h @@ -36,8 +36,7 @@ public: * to the component. * @return */ - virtual ReturnValue_t addComponent(object_id_t object, - bool setTaskIF = true) { + virtual ReturnValue_t addComponent(object_id_t object) { return HasReturnvaluesIF::RETURN_FAILED; };