Use C++17 feature - structured bindings

Summary:
Changelog: [internal]

Trying out C++ 17 feature: structured bindings.

Reviewed By: PeteTheHeat

Differential Revision: D27462634

fbshipit-source-id: 336f771e9579124f429ec648ee418f7ac52cd6a3
This commit is contained in:
Samuel Susla 2021-04-06 02:12:51 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 9a9e7f917b
Коммит 1739ab5ec2
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -241,9 +241,9 @@ static ModalHostViewEventEmitter::OnOrientationChange onOrientationChangeStruct(
self.viewController.supportedInterfaceOrientations = supportedOrientationsMask(newProps.supportedOrientations);
#endif
std::tuple<BOOL, UIModalTransitionStyle> result = animationConfiguration(newProps.animationType);
_shouldAnimatePresentation = std::get<0>(result);
self.viewController.modalTransitionStyle = std::get<1>(result);
auto const [shouldAnimate, transitionStyle] = animationConfiguration(newProps.animationType);
_shouldAnimatePresentation = shouldAnimate;
self.viewController.modalTransitionStyle = transitionStyle;
self.viewController.modalPresentationStyle = presentationConfiguration(newProps);