summaryrefslogtreecommitdiff
path: root/platform/android/src/style/layers/layer.cpp.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/src/style/layers/layer.cpp.ejs')
-rw-r--r--platform/android/src/style/layers/layer.cpp.ejs4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/android/src/style/layers/layer.cpp.ejs b/platform/android/src/style/layers/layer.cpp.ejs
index 1489d83a5e..c81fc5ab39 100644
--- a/platform/android/src/style/layers/layer.cpp.ejs
+++ b/platform/android/src/style/layers/layer.cpp.ejs
@@ -101,12 +101,12 @@ namespace android {
} // namespace
jni::Local<jni::Object<Layer>> <%- camelize(type) %>JavaLayerPeerFactory::createJavaLayerPeer(jni::JNIEnv& env, mbgl::Map& map, mbgl::style::Layer& layer) {
- assert(layer.baseImpl->getLayerFactory() == this);
+ assert(layer.baseImpl->getTypeInfo() == getTypeInfo());
return createJavaPeer(env, new <%- camelize(type) %>Layer(map, to<%- camelize(type) %>Layer(layer)));
}
jni::Local<jni::Object<Layer>> <%- camelize(type) %>JavaLayerPeerFactory::createJavaLayerPeer(jni::JNIEnv& env, mbgl::Map& map, std::unique_ptr<mbgl::style::Layer> layer) {
- assert(layer->baseImpl->getLayerFactory() == this);
+ assert(layer->baseImpl->getTypeInfo() == getTypeInfo());
return createJavaPeer(env, new <%- camelize(type) %>Layer(map, std::unique_ptr<mbgl::style::<%- camelize(type) %>Layer>(static_cast<mbgl::style::<%- camelize(type) %>Layer*>(layer.release()))));
}