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:
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user