Skip to content

Commit 07c45b4

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Fix DeadVariable and NotInvokedPrivateMethod: Remove unused code (facebook#55503)
Summary: Remove unused code that was triggering lint warnings: 1. Remove `walkUpUntilNativeKindIsParent` private method that was never invoked 2. Remove `parent` variable in `applyLayoutBase` that was never accessed Both were leftover from NativeKind removal. changelog: [internal] internal Reviewed By: alanleedev Differential Revision: D92021031
1 parent 9937a5d commit 07c45b4

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyOptimizer.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,6 @@ public void onBatchComplete() {
231231
mTagsWithLayoutVisited.clear();
232232
}
233233

234-
private NodeIndexPair walkUpUntilNativeKindIsParent(
235-
ReactShadowNode node, int indexInNativeChildren) {
236-
// Logic removed due to NativeKind removal
237-
return new NodeIndexPair(node, indexInNativeChildren);
238-
}
239-
240234
private void addNodeToNode(ReactShadowNode parent, ReactShadowNode child, int index) {
241235
// Logic removed due to NativeKind removal
242236
}
@@ -289,8 +283,6 @@ private void applyLayoutBase(ReactShadowNode node) {
289283
}
290284
mTagsWithLayoutVisited.put(tag, true);
291285

292-
ReactShadowNode parent = node.getParent();
293-
294286
// We use screenX/screenY (which round to integer pixels) at each node in the hierarchy to
295287
// emulate what the layout would look like if it were actually built with native views which
296288
// have to have integral top/left/bottom/right values

0 commit comments

Comments
 (0)