Fix YGNodeJobject method
Summary: We can use getCurrentEnv() , no need to pass env around methods Reviewed By: amir-shalem Differential Revision: D17841281 fbshipit-source-id: a4a58292e70ac05b0f0b9eb962a82a8501ad0226
This commit is contained in:
committed by
Facebook Github Bot
parent
2e321fc69f
commit
8aa67abdb2
@@ -25,13 +25,6 @@ static inline ScopedLocalRef<jobject> YGNodeJobject(
|
|||||||
->ref(getCurrentEnv(), node);
|
->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) {
|
static inline YGNodeRef _jlong2YGNodeRef(jlong addr) {
|
||||||
return reinterpret_cast<YGNodeRef>(static_cast<intptr_t>(addr));
|
return reinterpret_cast<YGNodeRef>(static_cast<intptr_t>(addr));
|
||||||
}
|
}
|
||||||
@@ -272,7 +265,7 @@ static void YGTransferLayoutOutputsRecursive(
|
|||||||
if (!root->getHasNewLayout()) {
|
if (!root->getHasNewLayout()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto obj = YGNodeJobject(env, root, layoutContext);
|
auto obj = YGNodeJobject(root, layoutContext);
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
Log::log(
|
Log::log(
|
||||||
root,
|
root,
|
||||||
|
Reference in New Issue
Block a user