add std::move when adding task to taskQueue (#46511)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46511

changelog: [internal]

task is not used after this line of code. Let's avoid copy shared_ptr's copy constructor.

Reviewed By: rubennorte

Differential Revision: D62751612

fbshipit-source-id: 92b0da44972b200870ef66f3a8482fbde55052ac
This commit is contained in:
Samuel Susla
2024-09-16 09:16:56 -07:00
committed by Facebook GitHub Bot
parent 8ac80e39ea
commit 8da5924b57
@@ -253,7 +253,7 @@ void RuntimeScheduler_Modern::scheduleTask(std::shared_ptr<Task> task) {
shouldScheduleEventLoop = true;
}
taskQueue_.push(task);
taskQueue_.push(std::move(task));
}
if (shouldScheduleEventLoop) {