diff --git a/android/src/main/cpp/JSIJNIConversion.cpp b/android/src/main/cpp/JSIJNIConversion.cpp index e85a6f7..4fcb7e6 100644 --- a/android/src/main/cpp/JSIJNIConversion.cpp +++ b/android/src/main/cpp/JSIJNIConversion.cpp @@ -156,10 +156,10 @@ jsi::Value JSIJNIConversion::convertJNIObjectToJSIValue(jsi::Runtime &runtime, c auto array = toArrayListFunc(object.get()); return convertJNIObjectToJSIValue(runtime, array); - } else if (object->isInstanceOf(jni::JHashMap::javaClassStatic())) { + } else if (object->isInstanceOf(JHashMap::javaClassStatic())) { // HashMap - auto map = static_ref_cast>(object); + auto map = static_ref_cast>(object); auto result = jsi::Object(runtime); for (const auto& entry : *map) { @@ -173,7 +173,7 @@ jsi::Value JSIJNIConversion::convertJNIObjectToJSIValue(jsi::Runtime &runtime, c } else if (object->isInstanceOf(react::ReadableMap::javaClassStatic())) { // ReadableMap - static const auto toHashMapFunc = react::ReadableMap::javaClassLocal()->getMethod()>("toHashMap"); + static const auto toHashMapFunc = react::ReadableMap::javaClassLocal()->getMethod()>("toHashMap"); // call recursive, this time HashMap auto hashMap = toHashMapFunc(object.get()); diff --git a/android/src/main/cpp/java-bindings/JHashMap.cpp b/android/src/main/cpp/java-bindings/JHashMap.cpp index c2ca243..affd464 100644 --- a/android/src/main/cpp/java-bindings/JHashMap.cpp +++ b/android/src/main/cpp/java-bindings/JHashMap.cpp @@ -7,14 +7,14 @@ #include #include +namespace vision { -namespace facebook { -namespace jni { +using namespace facebook; +using namespace jni; template local_ref> JHashMap::create() { return JHashMap::newInstance(); } -} // namespace jni -} // namespace facebook +} // namespace vision diff --git a/android/src/main/cpp/java-bindings/JHashMap.h b/android/src/main/cpp/java-bindings/JHashMap.h index c3df327..b11d3c8 100644 --- a/android/src/main/cpp/java-bindings/JHashMap.h +++ b/android/src/main/cpp/java-bindings/JHashMap.h @@ -7,9 +7,10 @@ #include #include +namespace vision { -namespace facebook { -namespace jni { +using namespace facebook; +using namespace jni; // TODO: Remove when fbjni 0.2.3 releases. template @@ -19,5 +20,4 @@ struct JHashMap : JavaClass, JMap> { static local_ref> create(); }; -} // namespace jni -} // namespace facebook +} // namespace vision