Index: libadblockplus-android/jni/Utils.cpp |
diff --git a/libadblockplus-android/jni/Utils.cpp b/libadblockplus-android/jni/Utils.cpp |
index 282ae5b344ea6640f6a6de8c3daf89e6b8f87f13..a5d87fea4e4675bb3781a26d728a4701041aa300 100644 |
--- a/libadblockplus-android/jni/Utils.cpp |
+++ b/libadblockplus-android/jni/Utils.cpp |
@@ -166,11 +166,6 @@ JNIEnvAcquire::~JNIEnvAcquire() |
template<typename T> |
static jobject NewJniObject(JNIEnv* env, const T& value, jclass clazz, jmethodID ctor) |
sergei
2017/04/26 09:21:00
`const T& value` -> `T&& value`
anton
2017/04/26 10:22:59
Acknowledged.
|
{ |
- if (!value.get()) |
- { |
- return 0; |
- } |
- |
return env->NewObject(clazz, ctor, JniPtrToLong(new T(value))); |
sergei
2017/04/26 09:21:00
return env->NewObject(clazz, ctor, JniPtrToLong(ne
anton
2017/04/26 10:22:59
then we will have compile error: "Error:(169, 80)
sergei
2017/04/26 14:12:56
That is strange, is it when the type of value arg
|
} |
@@ -182,19 +177,17 @@ static jobject NewJniObject(JNIEnv* env, const T& value, const char* javaClass) |
return NewJniObject(env, value, *clazz, ctor); |
} |
-jobject NewJniFilter(JNIEnv* env, const AdblockPlus::FilterPtr& filter) |
+jobject NewJniFilter(JNIEnv* env, AdblockPlus::Filter& filter) |
{ |
return NewJniObject(env, filter, filterClass->Get(), filterCtor); |
} |
-jobject NewJniSubscription(JNIEnv* env, |
- const AdblockPlus::SubscriptionPtr& subscription) |
+jobject NewJniSubscription(JNIEnv* env, AdblockPlus::Subscription& subscription) |
{ |
return NewJniObject(env, subscription, subscriptionClass->Get(), subscriptionCtor); |
} |
-jobject NewJniNotification(JNIEnv* env, |
- const AdblockPlus::NotificationPtr& notification) |
+jobject NewJniNotification(JNIEnv* env, AdblockPlus::Notification& notification) |
{ |
return NewJniObject(env, notification, notificationClass->Get(), notificationCtor); |
} |