Avoid extra copy and use more expressive APIs
Summary: changelog: [internal] Reviewed By: RSNara Differential Revision: D30756211 fbshipit-source-id: 650b3faa55ce1b6f33a452f25b699d854a5cee25
This commit is contained in:
Родитель
ba6f21e32d
Коммит
84d039aad2
|
@ -256,13 +256,12 @@ LayoutAnimationKeyFrameManager::pullTransaction(
|
|||
std::lock_guard<std::mutex> lock(currentAnimationMutex_);
|
||||
if (currentAnimation_) {
|
||||
currentAnimation = std::move(currentAnimation_);
|
||||
currentAnimation_ = {};
|
||||
currentAnimation_.reset();
|
||||
}
|
||||
}
|
||||
|
||||
if (currentAnimation) {
|
||||
LayoutAnimation animation = std::move(currentAnimation.value());
|
||||
currentAnimation = {};
|
||||
if (currentAnimation.hasValue()) {
|
||||
LayoutAnimation animation = std::move(currentAnimation).value();
|
||||
animation.surfaceId = surfaceId;
|
||||
animation.startTime = now;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче