mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
Fix deadstore in RCTSpringAnimation (#23643)
Summary: Fixes an unused storage of variable. [iOS] [Fixed] - Fix deadstore in RCTSpringAnimation Pull Request resolved: https://github.com/facebook/react-native/pull/23643 Differential Revision: D14211089 Pulled By: hramos fbshipit-source-id: 640d46be25f03d766698f6e85490c7d1a6a019fc
This commit is contained in:
committed by
Facebook Github Bot
parent
b758d63bc9
commit
cd7cc7d640
@@ -113,14 +113,12 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||
}
|
||||
|
||||
// calculate delta time
|
||||
NSTimeInterval deltaTime;
|
||||
if(_animationStartTime == -1) {
|
||||
_t = 0.0;
|
||||
_animationStartTime = currentTime;
|
||||
deltaTime = 0.0;
|
||||
} else {
|
||||
// Handle frame drops, and only advance dt by a max of MAX_DELTA_TIME
|
||||
deltaTime = MIN(MAX_DELTA_TIME, currentTime - _animationCurrentTime);
|
||||
NSTimeInterval deltaTime = MIN(MAX_DELTA_TIME, currentTime - _animationCurrentTime);
|
||||
_t = _t + deltaTime / RCTAnimationDragCoefficient();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user