rename PtrJNodeMap to PtrJNodeMapVanilla in yoga vanilla jni files

Summary: Rename PtrJNodeMap in vanilla files top PtrJNodeMapVanilla , otherwise they conflict

Reviewed By: amir-shalem

Differential Revision: D17842001

fbshipit-source-id: eb164076ee2a68d79dc376826508a4143056ea31
This commit is contained in:
Sidharth Guglani
2019-10-10 05:31:30 -07:00
committed by Facebook Github Bot
parent 8aa67abdb2
commit 050893f15a
2 changed files with 6 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ using facebook::yoga::detail::Log;
static inline ScopedLocalRef<jobject> YGNodeJobject(
YGNodeRef node,
void* layoutContext) {
return reinterpret_cast<PtrJNodeMap*>(layoutContext)
return reinterpret_cast<PtrJNodeMapVanilla*>(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 = &map;
}

View File

@@ -13,13 +13,13 @@
using namespace facebook::yoga::vanillajni;
using namespace std;
class PtrJNodeMap {
class PtrJNodeMapVanilla {
std::map<YGNodeRef, size_t> ptrsToIdxs_;
jobjectArray javaNodes_;
public:
PtrJNodeMap() : ptrsToIdxs_{}, javaNodes_{} {}
PtrJNodeMap(
PtrJNodeMapVanilla() : ptrsToIdxs_{}, javaNodes_{} {}
PtrJNodeMapVanilla(
jlong* nativePointers,
size_t nativePointersSize,
jobjectArray javaNodes)