From 0284a73042e5863a4663329a551b3afb4f32d513 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Mon, 11 Nov 2019 12:33:51 -0800 Subject: [PATCH] Update type for tag in Android mounting layer Summary: Easy replace of int -> Tag type in Binding changelog: [internal] Reviewed By: JoshuaGross Differential Revision: D18429188 fbshipit-source-id: 08a19dff60bd90585f59a284be0e46ee7f381bcc --- .../java/com/facebook/react/fabric/jni/Binding.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp index e54dd19081c..5d40644d803 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp @@ -47,8 +47,8 @@ static constexpr auto UIManagerJavaDescriptor = "com/facebook/react/fabric/FabricUIManager"; struct RemoveDeleteMetadata { - int tag; - int parentTag; + Tag tag; + Tag parentTag; int index; bool shouldRemove; bool shouldDelete; @@ -573,7 +573,7 @@ void Binding::schedulerDidFinishTransaction( auto surfaceId = mountingTransaction->getSurfaceId(); auto &mutations = mountingTransaction->getMutations(); - facebook::better::set createAndDeleteTagsToProcess; + facebook::better::set createAndDeleteTagsToProcess; // When collapseDeleteCreateMountingInstructions_ is enabled, the // createAndDeleteTagsToProcess set will contain all the tags belonging to // CREATE and DELETE mutation instructions that needs to be processed. If a @@ -589,7 +589,7 @@ void Binding::schedulerDidFinishTransaction( } else if (mutation.type == ShadowViewMutation::Create) { // TAG on 'Create' mutation instructions are part of the // newChildShadowView - int tag = mutation.newChildShadowView.tag; + Tag tag = mutation.newChildShadowView.tag; if (createAndDeleteTagsToProcess.find(tag) == createAndDeleteTagsToProcess.end()) { createAndDeleteTagsToProcess.insert(tag); @@ -627,7 +627,7 @@ void Binding::schedulerDidFinishTransaction( // The TAG on 'Delete' mutation instructions are part of the // oldChildShadowView. On the other side, the TAG on 'Create' mutation // instructions are part of the newChildShadowView - int tag = mutationType == ShadowViewMutation::Create + Tag tag = mutationType == ShadowViewMutation::Create ? mutation.newChildShadowView.tag : mutation.oldChildShadowView.tag; if (createAndDeleteTagsToProcess.find(tag) ==