From 9cd50a891dbd320e9e4816eef4545e0a41f9ab32 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Wed, 22 Aug 2018 12:27:43 -0700 Subject: [android] jni.hpp 4.0.0 --- .../src/style/conversion/property_value.hpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'platform/android/src/style/conversion/property_value.hpp') diff --git a/platform/android/src/style/conversion/property_value.hpp b/platform/android/src/style/conversion/property_value.hpp index 8150285c85..317705a286 100644 --- a/platform/android/src/style/conversion/property_value.hpp +++ b/platform/android/src/style/conversion/property_value.hpp @@ -19,16 +19,16 @@ class PropertyValueEvaluator { public: PropertyValueEvaluator(jni::JNIEnv& _env) : env(_env) {} - jni::jobject* operator()(const mbgl::style::Undefined) const { - return nullptr; + jni::Local> operator()(const mbgl::style::Undefined) const { + return jni::Local>(env, nullptr); } - jni::jobject* operator()(const T& value) const { - return *convert(env, value); + jni::Local> operator()(const T& value) const { + return std::move(*convert>>(env, value)); } - jni::jobject* operator()(const mbgl::style::PropertyExpression& value) const { - return *convert>(env, value); + jni::Local> operator()(const mbgl::style::PropertyExpression& value) const { + return std::move(*convert>>(env, value)); } private: @@ -39,8 +39,8 @@ private: * Convert core property values to java */ template -struct Converter> { - Result operator()(jni::JNIEnv& env, const mbgl::style::PropertyValue& value) const { +struct Converter>, mbgl::style::PropertyValue> { + Result>> operator()(jni::JNIEnv& env, const mbgl::style::PropertyValue& value) const { PropertyValueEvaluator evaluator(env); return value.evaluate(evaluator); } @@ -50,10 +50,10 @@ struct Converter> { * Convert core heat map color property value to java */ template <> -struct Converter { - Result operator()(jni::JNIEnv& env, const mbgl::style::ColorRampPropertyValue& value) const { +struct Converter>, mbgl::style::ColorRampPropertyValue> { + Result>> operator()(jni::JNIEnv& env, const mbgl::style::ColorRampPropertyValue& value) const { PropertyValueEvaluator evaluator(env); - return *convert(env, value.evaluate(evaluator)); + return std::move(*convert>>(env, value.evaluate(evaluator))); } }; -- cgit v1.2.1