fix: Fix duplicate JHashMap definition by moving to custom namespace (#610)

Technically `JHashMap` is duplicated now, but in separate namespaces. If I were to remove my `JHashMap` (and `JArrayList`) definitions, the user is forced to use fbjni v3.
This commit is contained in:
Marc Rousavy
2021-11-23 15:48:07 +01:00
committed by GitHub
parent 7206a794a9
commit 6025367c72
3 changed files with 11 additions and 11 deletions

View File

@@ -7,14 +7,14 @@
#include <jni.h>
#include <fbjni/fbjni.h>
namespace vision {
namespace facebook {
namespace jni {
using namespace facebook;
using namespace jni;
template <typename K, typename V>
local_ref<JHashMap<K, V>> JHashMap<K, V>::create() {
return JHashMap<K, V>::newInstance();
}
} // namespace jni
} // namespace facebook
} // namespace vision

View File

@@ -7,9 +7,10 @@
#include <jni.h>
#include <fbjni/fbjni.h>
namespace vision {
namespace facebook {
namespace jni {
using namespace facebook;
using namespace jni;
// TODO: Remove when fbjni 0.2.3 releases.
template <typename K = jobject, typename V = jobject>
@@ -19,5 +20,4 @@ struct JHashMap : JavaClass<JHashMap<K, V>, JMap<K, V>> {
static local_ref<JHashMap<K, V>> create();
};
} // namespace jni
} // namespace facebook
} // namespace vision