diff --git a/java/jni/YGJNIVanilla.cpp b/java/jni/YGJNIVanilla.cpp index 3fb03ece..31ad05aa 100644 --- a/java/jni/YGJNIVanilla.cpp +++ b/java/jni/YGJNIVanilla.cpp @@ -21,7 +21,7 @@ using facebook::yoga::detail::Log; static inline ScopedLocalRef YGNodeJobject( YGNodeRef node, void* layoutContext) { - return reinterpret_cast(layoutContext) + return reinterpret_cast(layoutContext) ->ref(getCurrentEnv(), node); } @@ -353,13 +353,13 @@ static void jni_YGNodeCalculateLayoutJNI( jobjectArray javaNodes) { void* layoutContext = nullptr; - auto map = PtrJNodeMap{}; + auto map = PtrJNodeMapVanilla{}; if (nativePointers) { size_t nativePointersSize = env->GetArrayLength(nativePointers); jlong result[nativePointersSize]; env->GetLongArrayRegion(nativePointers, 0, nativePointersSize, result); - map = PtrJNodeMap{result, nativePointersSize, javaNodes}; + map = PtrJNodeMapVanilla{result, nativePointersSize, javaNodes}; layoutContext = ↦ } diff --git a/java/jni/YGJTypesVanilla.h b/java/jni/YGJTypesVanilla.h index d98487ae..33d9c060 100644 --- a/java/jni/YGJTypesVanilla.h +++ b/java/jni/YGJTypesVanilla.h @@ -13,13 +13,13 @@ using namespace facebook::yoga::vanillajni; using namespace std; -class PtrJNodeMap { +class PtrJNodeMapVanilla { std::map ptrsToIdxs_; jobjectArray javaNodes_; public: - PtrJNodeMap() : ptrsToIdxs_{}, javaNodes_{} {} - PtrJNodeMap( + PtrJNodeMapVanilla() : ptrsToIdxs_{}, javaNodes_{} {} + PtrJNodeMapVanilla( jlong* nativePointers, size_t nativePointersSize, jobjectArray javaNodes)