mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
8ac80e39ea
commit
8da5924b57
+1
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user