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:
ericlewis
2019-02-25 11:30:51 -08:00
committed by Facebook Github Bot
parent b758d63bc9
commit cd7cc7d640

View File

@@ -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();
}