Skip to content

Commit

Permalink
Fix YGNodeJobject method
Browse files Browse the repository at this point in the history
Summary: We can use getCurrentEnv() , no need to pass env around methods

Reviewed By: amir-shalem

Differential Revision: D17841281

fbshipit-source-id: a4a58292e70ac05b0f0b9eb962a82a8501ad0226
  • Loading branch information
SidharthGuglani-zz authored and facebook-github-bot committed Oct 10, 2019
1 parent 9afc1bc commit 76ce30f
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ static inline ScopedLocalRef<jobject> YGNodeJobject(
->ref(getCurrentEnv(), node);
}

static inline ScopedLocalRef<jobject> YGNodeJobject(
JNIEnv* env,
YGNodeRef node,
void* layoutContext) {
return reinterpret_cast<PtrJNodeMap*>(layoutContext)->ref(env, node);
}

static inline YGNodeRef _jlong2YGNodeRef(jlong addr) {
return reinterpret_cast<YGNodeRef>(static_cast<intptr_t>(addr));
}
Expand Down Expand Up @@ -272,7 +265,7 @@ static void YGTransferLayoutOutputsRecursive(
if (!root->getHasNewLayout()) {
return;
}
auto obj = YGNodeJobject(env, root, layoutContext);
auto obj = YGNodeJobject(root, layoutContext);
if (!obj) {
Log::log(
root,
Expand Down

0 comments on commit 76ce30f

Please sign in to comment.