summaryrefslogtreecommitdiff
path: root/platform/android/src
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-01-26 18:52:44 +0100
committerKonstantin Käfer <mail@kkaefer.com>2017-01-27 11:44:16 +0100
commit62ea1f21858c69f6921c775ba7a3de201f0514d8 (patch)
tree7a4da88706e8a5513e1e13e993b2acc212cae3b1 /platform/android/src
parenta662508ddde4043ece36d8ea9b424368891d892c (diff)
downloadqtlocation-mapboxgl-62ea1f21858c69f6921c775ba7a3de201f0514d8.tar.gz
[core] remove trailing whitespace, add trailing newlines, add space after //
Diffstat (limited to 'platform/android/src')
-rw-r--r--platform/android/src/connectivity_listener.cpp8
-rw-r--r--platform/android/src/connectivity_listener.hpp8
-rw-r--r--platform/android/src/conversion/constant.hpp2
-rw-r--r--platform/android/src/conversion/conversion.hpp2
-rw-r--r--platform/android/src/geometry/conversion/feature.hpp28
-rw-r--r--platform/android/src/geometry/conversion/geometry.hpp14
-rw-r--r--platform/android/src/java_types.hpp2
-rwxr-xr-xplatform/android/src/jni.cpp20
-rw-r--r--platform/android/src/jni.hpp6
-rw-r--r--platform/android/src/style/android_conversion.hpp4
-rw-r--r--platform/android/src/style/conversion/function.hpp6
-rw-r--r--platform/android/src/style/conversion/geojson.hpp4
-rw-r--r--platform/android/src/style/conversion/property_value.hpp10
-rw-r--r--platform/android/src/style/conversion/types.hpp2
-rw-r--r--platform/android/src/style/conversion/types.hpp.ejs2
-rw-r--r--platform/android/src/style/conversion/types_string_values.hpp24
-rw-r--r--platform/android/src/style/conversion/types_string_values.hpp.ejs6
-rw-r--r--platform/android/src/style/conversion/url_or_tileset.hpp2
-rw-r--r--platform/android/src/style/layers/background_layer.cpp4
-rw-r--r--platform/android/src/style/layers/circle_layer.cpp4
-rw-r--r--platform/android/src/style/layers/custom_layer.cpp4
-rw-r--r--platform/android/src/style/layers/fill_layer.cpp4
-rw-r--r--platform/android/src/style/layers/layer.cpp22
-rw-r--r--platform/android/src/style/layers/layer.cpp.ejs4
-rw-r--r--platform/android/src/style/layers/layer.hpp20
-rw-r--r--platform/android/src/style/layers/layers.cpp4
-rw-r--r--platform/android/src/style/layers/layers.hpp2
-rw-r--r--platform/android/src/style/layers/line_layer.cpp4
-rw-r--r--platform/android/src/style/layers/raster_layer.cpp4
-rw-r--r--platform/android/src/style/layers/symbol_layer.cpp4
-rw-r--r--platform/android/src/style/sources/geojson_source.cpp10
-rw-r--r--platform/android/src/style/sources/raster_source.cpp4
-rw-r--r--platform/android/src/style/sources/source.cpp18
-rw-r--r--platform/android/src/style/sources/source.hpp16
-rw-r--r--platform/android/src/style/sources/sources.cpp2
-rw-r--r--platform/android/src/style/sources/sources.hpp8
-rw-r--r--platform/android/src/style/sources/vector_source.cpp4
-rw-r--r--platform/android/src/style/value.cpp2
-rw-r--r--platform/android/src/test/Main.java6
-rw-r--r--platform/android/src/timer.cpp2
40 files changed, 145 insertions, 157 deletions
diff --git a/platform/android/src/connectivity_listener.cpp b/platform/android/src/connectivity_listener.cpp
index cc2f0a4a81..5b1c0a86e4 100644
--- a/platform/android/src/connectivity_listener.cpp
+++ b/platform/android/src/connectivity_listener.cpp
@@ -22,12 +22,12 @@ namespace android {
jni::Class<ConnectivityListener> ConnectivityListener::javaClass;
void ConnectivityListener::registerNative(jni::JNIEnv& env) {
- //Lookup the class
+ // Lookup the class
ConnectivityListener::javaClass = *jni::Class<ConnectivityListener>::Find(env).NewGlobalRef(env).release();
#define METHOD(MethodPtr, name) jni::MakeNativePeerMethod<decltype(MethodPtr), (MethodPtr)>(name)
- //Register the peer
+ // Register the peer
jni::RegisterNativePeer<ConnectivityListener>(
env,
ConnectivityListener::javaClass,
@@ -39,5 +39,5 @@ namespace android {
);
}
-} //android
-} //mbgl \ No newline at end of file
+} // namespace android
+} // namespace mbgl
diff --git a/platform/android/src/connectivity_listener.hpp b/platform/android/src/connectivity_listener.hpp
index d457dcfd5a..b0d655d027 100644
--- a/platform/android/src/connectivity_listener.hpp
+++ b/platform/android/src/connectivity_listener.hpp
@@ -27,9 +27,5 @@ public:
};
-} //android
-} //mbgl
-
-
-
-
+} // namespace android
+} // namespace mbgl
diff --git a/platform/android/src/conversion/constant.hpp b/platform/android/src/conversion/constant.hpp
index f1a8171b99..2a0b710f73 100644
--- a/platform/android/src/conversion/constant.hpp
+++ b/platform/android/src/conversion/constant.hpp
@@ -76,7 +76,7 @@ struct Converter<jni::jobject*, T, typename std::enable_if<std::is_integral<T>::
}
};
-//TODO: convert integral types to primitive jni types
+// TODO: convert integral types to primitive jni types
template <>
struct Converter<jni::jobject*, std::string> {
diff --git a/platform/android/src/conversion/conversion.hpp b/platform/android/src/conversion/conversion.hpp
index 1277f3f67e..d1766f9755 100644
--- a/platform/android/src/conversion/conversion.hpp
+++ b/platform/android/src/conversion/conversion.hpp
@@ -47,4 +47,4 @@ Result<T> convert(jni::JNIEnv& env, const V& value, Args&&...args) {
} // namespace conversion
} // namespace android
-} // namespace mbgl \ No newline at end of file
+} // namespace mbgl
diff --git a/platform/android/src/geometry/conversion/feature.hpp b/platform/android/src/geometry/conversion/feature.hpp
index f0c77c3389..18f2741d66 100644
--- a/platform/android/src/geometry/conversion/feature.hpp
+++ b/platform/android/src/geometry/conversion/feature.hpp
@@ -64,7 +64,7 @@ public:
static jni::jclass* javaClass = jni::NewGlobalRef(env, &jni::FindClass(env, "com/google/gson/JsonPrimitive")).release();
static jni::jmethodID* constructor = &jni::GetMethodID(env, *javaClass, "<init>", "(Ljava/lang/Boolean;)V");
- //Create JsonPrimitive
+ // Create JsonPrimitive
jni::LocalObject<jni::jobject> converted = jni::NewLocalObject(env, *convert<jni::jobject*, bool>(env, value));
jni::jobject* object = &jni::NewObject(env, *javaClass, *constructor, *converted);
@@ -78,7 +78,7 @@ public:
static jni::jclass* javaClass = jni::NewGlobalRef(env, &jni::FindClass(env, "com/google/gson/JsonPrimitive")).release();
static jni::jmethodID* constructor = &jni::GetMethodID(env, *javaClass, "<init>", "(Ljava/lang/String;)V");
- //Create JsonPrimitive
+ // Create JsonPrimitive
jni::LocalObject<jni::jobject> converted = jni::NewLocalObject(env, *convert<jni::jobject*, std::string>(env, value));
jni::jobject* object = &jni::NewObject(env, *javaClass, *constructor, converted.get());
@@ -93,7 +93,7 @@ public:
static jni::jclass* javaClass = jni::NewGlobalRef(env, &jni::FindClass(env, "com/google/gson/JsonPrimitive")).release();
static jni::jmethodID* constructor = &jni::GetMethodID(env, *javaClass, "<init>", "(Ljava/lang/Number;)V");
- //Create JsonPrimitive
+ // Create JsonPrimitive
jni::LocalObject<jni::jobject> converted = jni::NewLocalObject(env, *convert<jni::jobject*, Number>(env, value));
jni::jobject* object = &jni::NewObject(env, *javaClass, *constructor, converted.get());
@@ -109,10 +109,10 @@ public:
static jni::jmethodID* constructor = &jni::GetMethodID(env, *javaClass, "<init>", "()V");;
static jni::jmethodID* add = &jni::GetMethodID(env, *javaClass, "add", "(Lcom/google/gson/JsonElement;)V");
- //Create json array
+ // Create json array
jni::jobject* jarray = &jni::NewObject(env, *javaClass, *constructor);
- //Add values
+ // Add values
for (const auto &v : values) {
jni::LocalObject<jni::jobject> converted = jni::NewLocalObject(env, mbgl::Value::visit(v, *this));
jni::CallMethod<void>(env, jarray, *add, converted.get());
@@ -125,15 +125,15 @@ public:
* Json Object
*/
jni::jobject* operator()(const std::unordered_map<std::string, mbgl::Value> &value) const {
- //TODO: clean up duplication here
+ // TODO: clean up duplication here
static jni::jclass* javaClass = jni::NewGlobalRef(env, &jni::FindClass(env, "com/google/gson/JsonObject")).release();
static jni::jmethodID* constructor = &jni::GetMethodID(env, *javaClass, "<init>", "()V");;
static jni::jmethodID* add = &jni::GetMethodID(env, *javaClass, "add", "(Ljava/lang/String;Lcom/google/gson/JsonElement;)V");
- //Create json object
+ // Create json object
jni::jobject* jsonObject = &jni::NewObject(env, *javaClass, *constructor);
- //Add items
+ // Add items
for (auto &item : value) {
jni::LocalObject<jni::jobject> converted = jni::NewLocalObject(env, mbgl::Value::visit(item.second, *this));
jni::LocalObject<jni::jobject> key = jni::NewLocalObject(env, *convert<jni::jobject*, std::string>(env, item.first));
@@ -151,10 +151,10 @@ struct Converter<jni::jobject*, std::unordered_map<std::string, mbgl::Value>> {
static jni::jmethodID* constructor = &jni::GetMethodID(env, *javaClass, "<init>", "()V");;
static jni::jmethodID* add = &jni::GetMethodID(env, *javaClass, "add", "(Ljava/lang/String;Lcom/google/gson/JsonElement;)V");
- //Create json object
+ // Create json object
jni::jobject* jsonObject = &jni::NewObject(env, *javaClass, *constructor);
- //Add items
+ // Add items
PropertyValueEvaluator evaluator {env};
for (auto &item : value) {
jni::LocalObject<jni::jobject> converted = jni::NewLocalObject(env, mbgl::Value::visit(item.second, evaluator));
@@ -173,18 +173,18 @@ struct Converter<jni::jobject*, mbgl::Feature> {
static jni::jclass* javaClass = jni::NewGlobalRef(env, &jni::FindClass(env, "com/mapbox/services/commons/geojson/Feature")).release();
static jni::jmethodID* fromGeometry = &jni::GetStaticMethodID(env, *javaClass, "fromGeometry", "(Lcom/mapbox/services/commons/geojson/Geometry;Lcom/google/gson/JsonObject;Ljava/lang/String;)Lcom/mapbox/services/commons/geojson/Feature;");
- //Convert Id
+ // Convert Id
FeatureIdVisitor idEvaluator;
std::string id = (value.id) ? mapbox::geometry::identifier::visit(value.id.value(), idEvaluator) : "";
jni::LocalObject<jni::jobject> jid = jni::NewLocalObject(env, *convert<jni::jobject*>(env, id));
- //Convert properties
+ // Convert properties
jni::LocalObject<jni::jobject> properties = jni::NewLocalObject(env, *convert<jni::jobject*>(env, value.properties));
- //Convert geometry
+ // Convert geometry
jni::LocalObject<jni::jobject> geometry = jni::NewLocalObject(env, *convert<jni::jobject*>(env, value.geometry));
- //Create feature
+ // Create feature
return {reinterpret_cast<jni::jobject*>(jni::CallStaticMethod<jni::jobject*>(env, *javaClass, *fromGeometry, geometry.get(), properties.get(), jid.get()))};
}
};
diff --git a/platform/android/src/geometry/conversion/geometry.hpp b/platform/android/src/geometry/conversion/geometry.hpp
index 385ba9034e..2ca63e2c11 100644
--- a/platform/android/src/geometry/conversion/geometry.hpp
+++ b/platform/android/src/geometry/conversion/geometry.hpp
@@ -27,7 +27,7 @@ public:
static jni::jclass* javaClass = jni::NewGlobalRef(env, &jni::FindClass(env, "com/mapbox/services/commons/geojson/Point")).release();
static jni::jmethodID* fromCoordinates = &jni::GetStaticMethodID(env, *javaClass, "fromCoordinates", "([D)Lcom/mapbox/services/commons/geojson/Point;");
- //Create Point
+ // Create Point
jni::LocalObject<jni::jarray<jni::jdouble>> position = jni::NewLocalObject(env, toGeoJsonPosition(env, geometry.x, geometry.y));
return reinterpret_cast<jni::jobject*>(jni::CallStaticMethod<jni::jobject*>(env, *javaClass, *fromCoordinates, position.get()));
}
@@ -39,7 +39,7 @@ public:
static jni::jclass* javaClass = jni::NewGlobalRef(env, &jni::FindClass(env, "com/mapbox/services/commons/geojson/LineString")).release();
static jni::jmethodID* fromCoordinates = &jni::GetStaticMethodID(env, *javaClass, "fromCoordinates", "([[D)Lcom/mapbox/services/commons/geojson/LineString;");
- //Create
+ // Create
jni::LocalObject<jni::jarray<jni::jobject>> coordinates = jni::NewLocalObject(env, toGeoJsonCoordinates(env, geometry));
return reinterpret_cast<jni::jobject*>(jni::CallStaticMethod<jni::jobject*>(env, *javaClass, *fromCoordinates, coordinates.get()));
}
@@ -51,7 +51,7 @@ public:
static jni::jclass* javaClass = jni::NewGlobalRef(env, &jni::FindClass(env, "com/mapbox/services/commons/geojson/MultiPoint")).release();
static jni::jmethodID* fromCoordinates = &jni::GetStaticMethodID(env, *javaClass, "fromCoordinates", "([[D)Lcom/mapbox/services/commons/geojson/MultiPoint;");
- //Create
+ // Create
jni::LocalObject<jni::jarray<jni::jobject>> coordinates = jni::NewLocalObject(env, toGeoJsonCoordinates(env, geometry));
return reinterpret_cast<jni::jobject*>(jni::CallStaticMethod<jni::jobject*>(env, *javaClass, *fromCoordinates, coordinates.get()));
}
@@ -63,7 +63,7 @@ public:
static jni::jclass* javaClass = jni::NewGlobalRef(env, &jni::FindClass(env, "com/mapbox/services/commons/geojson/Polygon")).release();
static jni::jmethodID* fromCoordinates = &jni::GetStaticMethodID(env, *javaClass, "fromCoordinates", "([[[D)Lcom/mapbox/services/commons/geojson/Polygon;");
- //Create
+ // Create
jni::LocalObject<jni::jarray<jni::jobject>> shape = jni::NewLocalObject(env, toShape<>(env, geometry));
return reinterpret_cast<jni::jobject*>(jni::CallStaticMethod<jni::jobject*>(env, *javaClass, *fromCoordinates, shape.get()));
}
@@ -75,7 +75,7 @@ public:
static jni::jclass* javaClass = jni::NewGlobalRef(env, &jni::FindClass(env, "com/mapbox/services/commons/geojson/MultiLineString")).release();
static jni::jmethodID* fromCoordinates = &jni::GetStaticMethodID(env, *javaClass, "fromCoordinates", "([[[D)Lcom/mapbox/services/commons/geojson/MultiLineString;");
- //Create
+ // Create
jni::LocalObject<jni::jarray<jni::jobject>> shape = jni::NewLocalObject(env, toShape<>(env, geometry));
return reinterpret_cast<jni::jobject*>(jni::CallStaticMethod<jni::jobject*>(env, *javaClass, *fromCoordinates, shape.get()));
}
@@ -92,7 +92,7 @@ public:
jni::SetObjectArrayElement(env, *jarray, i, shape.get());
}
- //Create the MultiPolygon
+ // Create the MultiPolygon
static jni::jclass* javaClass = jni::NewGlobalRef(env, &jni::FindClass(env, "com/mapbox/services/commons/geojson/MultiPolygon")).release();
static jni::jmethodID* fromGeometries = &jni::GetStaticMethodID(env, *javaClass, "fromCoordinates", "([[[[D)Lcom/mapbox/services/commons/geojson/MultiPolygon;");
return reinterpret_cast<jni::jobject*>(jni::CallStaticMethod<jni::jobject*>(env, *javaClass, *fromGeometries, jarray.get()));
@@ -111,7 +111,7 @@ public:
jni::SetObjectArrayElement(env, *jarray, i, converted.get());
}
- //Turn into array list and create the GeometryCollection
+ // Turn into array list and create the GeometryCollection
static jni::jclass* javaClass = jni::NewGlobalRef(env, &jni::FindClass(env, "com/mapbox/services/commons/geojson/GeometryCollection")).release();
static jni::jmethodID* fromGeometries = &jni::GetStaticMethodID(env, *javaClass, "fromGeometries", "(Ljava/util/List;)Lcom/mapbox/services/commons/geojson/GeometryCollection;");
diff --git a/platform/android/src/java_types.hpp b/platform/android/src/java_types.hpp
index 2e2c5fc2d6..b416a75b91 100644
--- a/platform/android/src/java_types.hpp
+++ b/platform/android/src/java_types.hpp
@@ -32,4 +32,4 @@ namespace java {
void registerNatives(JNIEnv&);
}
}
-} \ No newline at end of file
+}
diff --git a/platform/android/src/jni.cpp b/platform/android/src/jni.cpp
index 1ef7fec8fb..009de89db2 100755
--- a/platform/android/src/jni.cpp
+++ b/platform/android/src/jni.cpp
@@ -1128,17 +1128,17 @@ jni::jobject* nativeGetLayer(JNIEnv *env, jni::jobject* obj, jlong nativeMapView
assert(env);
assert(nativeMapViewPtr != 0);
- //Get the native map peer
+ // Get the native map peer
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
- //Find the layer
+ // Find the layer
mbgl::style::Layer* coreLayer = nativeMapView->getMap().getLayer(std_string_from_jstring(env, layerId));
if (!coreLayer) {
mbgl::Log::Debug(mbgl::Event::JNI, "No layer found");
return jni::Object<Layer>();
}
- //Create and return the layer's native peer
+ // Create and return the layer's native peer
return createJavaLayerPeer(*env, nativeMapView->getMap(), *coreLayer);
}
@@ -1189,17 +1189,17 @@ jni::jobject* nativeGetSource(JNIEnv *env, jni::jobject* obj, jni::jlong nativeM
assert(env);
assert(nativeMapViewPtr != 0);
- //Get the native map peer
+ // Get the native map peer
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
- //Find the source
+ // Find the source
mbgl::style::Source* coreSource = nativeMapView->getMap().getSource(std_string_from_jstring(env, sourceId));
if (!coreSource) {
mbgl::Log::Debug(mbgl::Event::JNI, "No source found");
return jni::Object<Source>();
}
- //Create and return the source's native peer
+ // Create and return the source's native peer
return createJavaSourcePeer(*env, nativeMapView->getMap(), *coreSource);
}
@@ -1255,7 +1255,7 @@ void nativeAddImage(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jni:
jni::GetArrayRegion(*env, *data, 0, size, reinterpret_cast<jbyte*>(premultipliedImage.data.get()));
- //Wrap in a SpriteImage with the correct pixel ratio
+ // Wrap in a SpriteImage with the correct pixel ratio
auto spriteImage = std::make_unique<mbgl::SpriteImage>(std::move(premultipliedImage), float(pixelRatio));
nativeMapView->getMap().addImage(std_string_from_jstring(env, name), std::move(spriteImage));
@@ -2045,6 +2045,6 @@ void registerNatives(JavaVM *vm) {
__system_property_get("ro.build.version.release", release);
androidRelease = std::string(release);
}
-
-} // android
-} // mbgl
+
+} // namespace android
+} // namespace mbgl
diff --git a/platform/android/src/jni.hpp b/platform/android/src/jni.hpp
index 90ec914cf2..d12030f3c1 100644
--- a/platform/android/src/jni.hpp
+++ b/platform/android/src/jni.hpp
@@ -23,8 +23,8 @@ extern jmethodID onSnapshotReadyId;
extern bool attach_jni_thread(JavaVM* vm, JNIEnv** env, std::string threadName);
extern void detach_jni_thread(JavaVM* vm, JNIEnv** env, bool detach);
-
+
extern void registerNatives(JavaVM* vm);
-} //android
-} //mbgl
+} // namespace android
+} // namespace mbgl
diff --git a/platform/android/src/style/android_conversion.hpp b/platform/android/src/style/android_conversion.hpp
index de0ac91502..8ae694d115 100644
--- a/platform/android/src/style/android_conversion.hpp
+++ b/platform/android/src/style/android_conversion.hpp
@@ -45,7 +45,7 @@ inline optional<mbgl::android::Value> objectMember(const mbgl::android::Value& v
template <class Fn>
optional<Error> eachMember(const mbgl::android::Value&, Fn&&) {
- //TODO
+ // TODO
mbgl::Log::Warning(mbgl::Event::Android, "eachMember not implemented");
return {};
}
@@ -82,7 +82,7 @@ inline optional<Value> toValue(const mbgl::android::Value& value) {
} else if (value.isString()) {
return { value.toString() };
} else if (value.isNumber()) {
- //Need to cast to a double here as the float is otherwise considered a bool...
+ // Need to cast to a double here as the float is otherwise considered a bool...
return { (double) value.toNumber() };
} else {
return {};
diff --git a/platform/android/src/style/conversion/function.hpp b/platform/android/src/style/conversion/function.hpp
index 26dd5c21fd..ed383b7b56 100644
--- a/platform/android/src/style/conversion/function.hpp
+++ b/platform/android/src/style/conversion/function.hpp
@@ -39,10 +39,10 @@ struct Converter<jni::jobject*, mbgl::style::Function<T>> {
static jni::jmethodID* constructor = &jni::GetMethodID(env, *javaClass, "<init>", "([Lcom/mapbox/mapboxsdk/style/layers/Function$Stop;)V");
static jni::jmethodID* withBase = &jni::GetMethodID(env, *javaClass, "withBase", "(F)Lcom/mapbox/mapboxsdk/style/layers/Function;");
- //Create object
+ // Create object
jni::jobject* jfunction = &jni::NewObject(env, *javaClass, *constructor, *toFunctionStopJavaArray(env, value.getStops()));
- //Set base
+ // Set base
jni::CallMethod<jni::jobject*>(env, jfunction, *withBase, value.getBase());
return {jfunction};
@@ -51,4 +51,4 @@ struct Converter<jni::jobject*, mbgl::style::Function<T>> {
} // namespace conversion
} // namespace android
-} // namespace mbgl \ No newline at end of file
+} // namespace mbgl
diff --git a/platform/android/src/style/conversion/geojson.hpp b/platform/android/src/style/conversion/geojson.hpp
index 6bc48b3700..415d96f467 100644
--- a/platform/android/src/style/conversion/geojson.hpp
+++ b/platform/android/src/style/conversion/geojson.hpp
@@ -19,7 +19,7 @@ namespace conversion {
template <>
Result<GeoJSON> convertGeoJSON(const mbgl::android::Value& value) {
- //Value should be a string wrapped in an object
+ // Value should be a string wrapped in an object
mbgl::android::Value jsonValue = value.get("data");
if(value.isNull()) {
return Error { "no json data found" };
@@ -54,4 +54,4 @@ struct Converter<GeoJSON> {
} // namespace conversion
} // namespace style
-} // namespace mbgl \ No newline at end of file
+} // namespace mbgl
diff --git a/platform/android/src/style/conversion/property_value.hpp b/platform/android/src/style/conversion/property_value.hpp
index 4121192f3f..a89b93794a 100644
--- a/platform/android/src/style/conversion/property_value.hpp
+++ b/platform/android/src/style/conversion/property_value.hpp
@@ -16,15 +16,15 @@ struct Converter<jni::jobject*, mbgl::style::PropertyValue<T>> {
Result<jni::jobject*> operator()(jni::JNIEnv& env, const mbgl::style::PropertyValue<T>& value) const {
if(value.isUndefined()) {
- //Return a nullptr representing a Java null value
+ // Return a nullptr representing a Java null value
return {nullptr};
} else if (value.isConstant()) {
- //Time to convert the constant value
+ // Time to convert the constant value
Result<jni::jobject*> result = convert<jni::jobject*, T>(env, value.asConstant());
return {*result};
- //return converted;
+ // return converted;
} else if (value.isFunction()) {
- //Must be a function than
+ // Must be a function than
return convert<jni::jobject*, mbgl::style::Function<T>>(env, value.asFunction());
} else {
throw std::runtime_error("Unknown property value type");
@@ -35,4 +35,4 @@ struct Converter<jni::jobject*, mbgl::style::PropertyValue<T>> {
} // namespace conversion
} // namespace android
-} // namespace mbgl \ No newline at end of file
+} // namespace mbgl
diff --git a/platform/android/src/style/conversion/types.hpp b/platform/android/src/style/conversion/types.hpp
index 1c433bb264..d9921e582e 100644
--- a/platform/android/src/style/conversion/types.hpp
+++ b/platform/android/src/style/conversion/types.hpp
@@ -95,4 +95,4 @@ struct Converter<jni::jobject*, mbgl::style::CirclePitchScaleType> {
} // namespace conversion
} // namespace android
-} // namespace mbgl \ No newline at end of file
+} // namespace mbgl
diff --git a/platform/android/src/style/conversion/types.hpp.ejs b/platform/android/src/style/conversion/types.hpp.ejs
index d248d42b72..3cd4764015 100644
--- a/platform/android/src/style/conversion/types.hpp.ejs
+++ b/platform/android/src/style/conversion/types.hpp.ejs
@@ -37,4 +37,4 @@ struct Converter<jni::jobject*, mbgl::style::<%- propertyNativeType(property) %>
} // namespace conversion
} // namespace android
-} // namespace mbgl \ No newline at end of file
+} // namespace mbgl
diff --git a/platform/android/src/style/conversion/types_string_values.hpp b/platform/android/src/style/conversion/types_string_values.hpp
index 9f21a2fed9..e3108fdf5b 100644
--- a/platform/android/src/style/conversion/types_string_values.hpp
+++ b/platform/android/src/style/conversion/types_string_values.hpp
@@ -10,7 +10,7 @@ namespace mbgl {
namespace android {
namespace conversion {
- //visibility
+ // visibility
inline std::string toString(mbgl::style::VisibilityType value) {
switch (value) {
case mbgl::style::VisibilityType::Visible:
@@ -24,7 +24,7 @@ namespace conversion {
}
}
- //line-cap
+ // line-cap
inline std::string toString(mbgl::style::LineCapType value) {
switch (value) {
case mbgl::style::LineCapType::Butt:
@@ -41,7 +41,7 @@ namespace conversion {
}
}
- //line-join
+ // line-join
inline std::string toString(mbgl::style::LineJoinType value) {
switch (value) {
case mbgl::style::LineJoinType::Bevel:
@@ -58,7 +58,7 @@ namespace conversion {
}
}
- //symbol-placement
+ // symbol-placement
inline std::string toString(mbgl::style::SymbolPlacementType value) {
switch (value) {
case mbgl::style::SymbolPlacementType::Point:
@@ -72,7 +72,7 @@ namespace conversion {
}
}
- //icon-rotation-alignment
+ // icon-rotation-alignment
inline std::string toString(mbgl::style::AlignmentType value) {
switch (value) {
case mbgl::style::AlignmentType::Map:
@@ -89,7 +89,7 @@ namespace conversion {
}
}
- //icon-text-fit
+ // icon-text-fit
inline std::string toString(mbgl::style::IconTextFitType value) {
switch (value) {
case mbgl::style::IconTextFitType::None:
@@ -109,7 +109,7 @@ namespace conversion {
}
}
- //text-justify
+ // text-justify
inline std::string toString(mbgl::style::TextJustifyType value) {
switch (value) {
case mbgl::style::TextJustifyType::Left:
@@ -126,7 +126,7 @@ namespace conversion {
}
}
- //text-anchor
+ // text-anchor
inline std::string toString(mbgl::style::TextAnchorType value) {
switch (value) {
case mbgl::style::TextAnchorType::Center:
@@ -161,7 +161,7 @@ namespace conversion {
}
}
- //text-transform
+ // text-transform
inline std::string toString(mbgl::style::TextTransformType value) {
switch (value) {
case mbgl::style::TextTransformType::None:
@@ -178,7 +178,7 @@ namespace conversion {
}
}
- //fill-translate-anchor
+ // fill-translate-anchor
inline std::string toString(mbgl::style::TranslateAnchorType value) {
switch (value) {
case mbgl::style::TranslateAnchorType::Map:
@@ -192,7 +192,7 @@ namespace conversion {
}
}
- //circle-pitch-scale
+ // circle-pitch-scale
inline std::string toString(mbgl::style::CirclePitchScaleType value) {
switch (value) {
case mbgl::style::CirclePitchScaleType::Map:
@@ -209,4 +209,4 @@ namespace conversion {
} // namespace conversion
} // namespace android
-} // namespace mbgl \ No newline at end of file
+} // namespace mbgl
diff --git a/platform/android/src/style/conversion/types_string_values.hpp.ejs b/platform/android/src/style/conversion/types_string_values.hpp.ejs
index c1646baa1a..bf52919741 100644
--- a/platform/android/src/style/conversion/types_string_values.hpp.ejs
+++ b/platform/android/src/style/conversion/types_string_values.hpp.ejs
@@ -13,7 +13,7 @@ namespace mbgl {
namespace android {
namespace conversion {
- //visibility
+ // visibility
inline std::string toString(mbgl::style::VisibilityType value) {
switch (value) {
case mbgl::style::VisibilityType::Visible:
@@ -28,7 +28,7 @@ namespace conversion {
}
<% for (const property of properties) { -%>
- //<%- property.name %>
+ // <%- property.name %>
inline std::string toString(mbgl::style::<%- propertyNativeType(property) %> value) {
switch (value) {
<% for (const value in property.values) { -%>
@@ -45,4 +45,4 @@ namespace conversion {
} // namespace conversion
} // namespace android
-} // namespace mbgl \ No newline at end of file
+} // namespace mbgl
diff --git a/platform/android/src/style/conversion/url_or_tileset.hpp b/platform/android/src/style/conversion/url_or_tileset.hpp
index c1801f56d0..4e502324d0 100644
--- a/platform/android/src/style/conversion/url_or_tileset.hpp
+++ b/platform/android/src/style/conversion/url_or_tileset.hpp
@@ -35,4 +35,4 @@ struct Converter<variant<std::string, Tileset>> {
}
}
-} \ No newline at end of file
+}
diff --git a/platform/android/src/style/layers/background_layer.cpp b/platform/android/src/style/layers/background_layer.cpp
index 021ac947ad..6b013ae086 100644
--- a/platform/android/src/style/layers/background_layer.cpp
+++ b/platform/android/src/style/layers/background_layer.cpp
@@ -47,12 +47,12 @@ namespace android {
}
void BackgroundLayer::registerNative(jni::JNIEnv& env) {
- //Lookup the class
+ // Lookup the class
BackgroundLayer::javaClass = *jni::Class<BackgroundLayer>::Find(env).NewGlobalRef(env).release();
#define METHOD(MethodPtr, name) jni::MakeNativePeerMethod<decltype(MethodPtr), (MethodPtr)>(name)
- //Register the peer
+ // Register the peer
jni::RegisterNativePeer<BackgroundLayer>(
env, BackgroundLayer::javaClass, "nativePtr",
std::make_unique<BackgroundLayer, JNIEnv&, jni::String>,
diff --git a/platform/android/src/style/layers/circle_layer.cpp b/platform/android/src/style/layers/circle_layer.cpp
index 4a6ba95d31..2b33a2dd47 100644
--- a/platform/android/src/style/layers/circle_layer.cpp
+++ b/platform/android/src/style/layers/circle_layer.cpp
@@ -89,12 +89,12 @@ namespace android {
}
void CircleLayer::registerNative(jni::JNIEnv& env) {
- //Lookup the class
+ // Lookup the class
CircleLayer::javaClass = *jni::Class<CircleLayer>::Find(env).NewGlobalRef(env).release();
#define METHOD(MethodPtr, name) jni::MakeNativePeerMethod<decltype(MethodPtr), (MethodPtr)>(name)
- //Register the peer
+ // Register the peer
jni::RegisterNativePeer<CircleLayer>(
env, CircleLayer::javaClass, "nativePtr",
std::make_unique<CircleLayer, JNIEnv&, jni::String, jni::String>,
diff --git a/platform/android/src/style/layers/custom_layer.cpp b/platform/android/src/style/layers/custom_layer.cpp
index d5d330a019..9bdc308d85 100644
--- a/platform/android/src/style/layers/custom_layer.cpp
+++ b/platform/android/src/style/layers/custom_layer.cpp
@@ -40,12 +40,12 @@ namespace android {
}
void CustomLayer::registerNative(jni::JNIEnv& env) {
- //Lookup the class
+ // Lookup the class
CustomLayer::javaClass = *jni::Class<CustomLayer>::Find(env).NewGlobalRef(env).release();
#define METHOD(MethodPtr, name) jni::MakeNativePeerMethod<decltype(MethodPtr), (MethodPtr)>(name)
- //Register the peer
+ // Register the peer
jni::RegisterNativePeer<CustomLayer>(
env, CustomLayer::javaClass, "nativePtr",
std::make_unique<CustomLayer, JNIEnv&, jni::String, jni::jlong, jni::jlong, jni::jlong, jni::jlong>,
diff --git a/platform/android/src/style/layers/fill_layer.cpp b/platform/android/src/style/layers/fill_layer.cpp
index 84d47b6afe..d818314f89 100644
--- a/platform/android/src/style/layers/fill_layer.cpp
+++ b/platform/android/src/style/layers/fill_layer.cpp
@@ -71,12 +71,12 @@ namespace android {
}
void FillLayer::registerNative(jni::JNIEnv& env) {
- //Lookup the class
+ // Lookup the class
FillLayer::javaClass = *jni::Class<FillLayer>::Find(env).NewGlobalRef(env).release();
#define METHOD(MethodPtr, name) jni::MakeNativePeerMethod<decltype(MethodPtr), (MethodPtr)>(name)
- //Register the peer
+ // Register the peer
jni::RegisterNativePeer<FillLayer>(
env, FillLayer::javaClass, "nativePtr",
std::make_unique<FillLayer, JNIEnv&, jni::String, jni::String>,
diff --git a/platform/android/src/style/layers/layer.cpp b/platform/android/src/style/layers/layer.cpp
index c0c57c839d..bfc09be302 100644
--- a/platform/android/src/style/layers/layer.cpp
+++ b/platform/android/src/style/layers/layer.cpp
@@ -5,12 +5,12 @@
#include <mbgl/util/logging.hpp>
-//Java -> C++ conversion
+// Java -> C++ conversion
#include <mbgl/style/conversion.hpp>
#include <mbgl/style/conversion/layer.hpp>
#include <mbgl/style/conversion/source.hpp>
-//C++ -> Java conversion
+// C++ -> Java conversion
#include "../conversion/property_value.hpp"
#include <string>
@@ -33,15 +33,15 @@ namespace android {
}
void Layer::addToMap(mbgl::Map& _map, mbgl::optional<std::string> before) {
- //Check to see if we own the layer first
+ // Check to see if we own the layer first
if (!ownedLayer) {
throw std::runtime_error("Cannot add layer twice");
}
- //Add layer to map
+ // Add layer to map
_map.addLayer(releaseCoreLayer(), before);
- //Save pointer to the map
+ // Save pointer to the map
this->map = &_map;
}
@@ -65,7 +65,7 @@ namespace android {
void Layer::setLayoutProperty(jni::JNIEnv& env, jni::String jname, jni::Object<> jvalue) {
Value value(env, jvalue);
- //Convert and set property
+ // Convert and set property
optional<mbgl::style::conversion::Error> error = mbgl::style::conversion::setLayoutProperty(layer, jni::Make<std::string>(env, jname), value);
if (error) {
mbgl::Log::Error(mbgl::Event::JNI, "Error setting property: " + jni::Make<std::string>(env, jname) + " " + error->message);
@@ -76,7 +76,7 @@ namespace android {
void Layer::setPaintProperty(jni::JNIEnv& env, jni::String jname, jni::Object<> jvalue) {
Value value(env, jvalue);
- //Convert and set property
+ // Convert and set property
optional<mbgl::style::conversion::Error> error = mbgl::style::conversion::setPaintProperty(layer, jni::Make<std::string>(env, jname), value, mbgl::optional<std::string>());
if (error) {
mbgl::Log::Error(mbgl::Event::JNI, "Error setting property: " + jni::Make<std::string>(env, jname) + " " + error->message);
@@ -153,12 +153,12 @@ namespace android {
jni::Class<Layer> Layer::javaClass;
void Layer::registerNative(jni::JNIEnv& env) {
- //Lookup the class
+ // Lookup the class
Layer::javaClass = *jni::Class<Layer>::Find(env).NewGlobalRef(env).release();
#define METHOD(MethodPtr, name) jni::MakeNativePeerMethod<decltype(MethodPtr), (MethodPtr)>(name)
- //Register the peer
+ // Register the peer
jni::RegisterNativePeer<Layer>(env, Layer::javaClass, "nativePtr",
METHOD(&Layer::getId, "nativeGetId"),
METHOD(&Layer::setLayoutProperty, "nativeSetLayoutProperty"),
@@ -174,5 +174,5 @@ namespace android {
}
-} //android
-} //mbgl \ No newline at end of file
+} // namespace android
+} // namespace mbgl
diff --git a/platform/android/src/style/layers/layer.cpp.ejs b/platform/android/src/style/layers/layer.cpp.ejs
index 500c76ea7a..9a1274965b 100644
--- a/platform/android/src/style/layers/layer.cpp.ejs
+++ b/platform/android/src/style/layers/layer.cpp.ejs
@@ -46,12 +46,12 @@ namespace android {
}
void <%- camelize(type) %>Layer::registerNative(jni::JNIEnv& env) {
- //Lookup the class
+ // Lookup the class
<%- camelize(type) %>Layer::javaClass = *jni::Class<<%- camelize(type) %>Layer>::Find(env).NewGlobalRef(env).release();
#define METHOD(MethodPtr, name) jni::MakeNativePeerMethod<decltype(MethodPtr), (MethodPtr)>(name)
- //Register the peer
+ // Register the peer
jni::RegisterNativePeer<<%- camelize(type) %>Layer>(
env, <%- camelize(type) %>Layer::javaClass, "nativePtr",
<% if (type === 'background') { -%>
diff --git a/platform/android/src/style/layers/layer.hpp b/platform/android/src/style/layers/layer.hpp
index f3cd073552..bf07adad67 100644
--- a/platform/android/src/style/layers/layer.hpp
+++ b/platform/android/src/style/layers/layer.hpp
@@ -49,7 +49,7 @@ public:
void setPaintProperty(jni::JNIEnv&, jni::String, jni::Object<> value);
- //Zoom
+ // Zoom
jni::jfloat getMinZoom(jni::JNIEnv&);
@@ -65,28 +65,24 @@ public:
void setSourceLayer(jni::JNIEnv& env, jni::String sourceLayer);
- //Property getters
+ // Property getters
jni::Object<jni::ObjectTag> getVisibility(jni::JNIEnv&);
protected:
- //Release the owned view and return it
+ // Release the owned view and return it
std::unique_ptr<mbgl::style::Layer> releaseCoreLayer();
- //Owned layer is set when creating a new layer, before adding it to the map
+ // Owned layer is set when creating a new layer, before adding it to the map
std::unique_ptr<mbgl::style::Layer> ownedLayer;
- //Raw reference to the layer
+ // Raw reference to the layer
mbgl::style::Layer& layer;
- //Map is set when the layer is retrieved or after adding to the map
+ // Map is set when the layer is retrieved or after adding to the map
mbgl::Map* map;
};
-} //android
-} //mbgl
-
-
-
-
+} // namespace android
+} // namespace mbgl
diff --git a/platform/android/src/style/layers/layers.cpp b/platform/android/src/style/layers/layers.cpp
index 57dbf6f4b1..c8e981b966 100644
--- a/platform/android/src/style/layers/layers.cpp
+++ b/platform/android/src/style/layers/layers.cpp
@@ -60,5 +60,5 @@ void registerNativeLayers(jni::JNIEnv& env) {
CustomLayer::registerNative(env);
}
-} //android
-} //mbgl \ No newline at end of file
+} // namespace android
+} // namespace mbgl
diff --git a/platform/android/src/style/layers/layers.hpp b/platform/android/src/style/layers/layers.hpp
index 0c979ec2cf..111b521c26 100644
--- a/platform/android/src/style/layers/layers.hpp
+++ b/platform/android/src/style/layers/layers.hpp
@@ -17,4 +17,4 @@ jni::jobject* createJavaLayerPeer(jni::JNIEnv&, mbgl::Map&, mbgl::style::Layer&)
void registerNativeLayers(jni::JNIEnv&);
}
-} \ No newline at end of file
+}
diff --git a/platform/android/src/style/layers/line_layer.cpp b/platform/android/src/style/layers/line_layer.cpp
index 2dce8b618a..e53e2060c8 100644
--- a/platform/android/src/style/layers/line_layer.cpp
+++ b/platform/android/src/style/layers/line_layer.cpp
@@ -113,12 +113,12 @@ namespace android {
}
void LineLayer::registerNative(jni::JNIEnv& env) {
- //Lookup the class
+ // Lookup the class
LineLayer::javaClass = *jni::Class<LineLayer>::Find(env).NewGlobalRef(env).release();
#define METHOD(MethodPtr, name) jni::MakeNativePeerMethod<decltype(MethodPtr), (MethodPtr)>(name)
- //Register the peer
+ // Register the peer
jni::RegisterNativePeer<LineLayer>(
env, LineLayer::javaClass, "nativePtr",
std::make_unique<LineLayer, JNIEnv&, jni::String, jni::String>,
diff --git a/platform/android/src/style/layers/raster_layer.cpp b/platform/android/src/style/layers/raster_layer.cpp
index 25b26155ae..69fd634bce 100644
--- a/platform/android/src/style/layers/raster_layer.cpp
+++ b/platform/android/src/style/layers/raster_layer.cpp
@@ -71,12 +71,12 @@ namespace android {
}
void RasterLayer::registerNative(jni::JNIEnv& env) {
- //Lookup the class
+ // Lookup the class
RasterLayer::javaClass = *jni::Class<RasterLayer>::Find(env).NewGlobalRef(env).release();
#define METHOD(MethodPtr, name) jni::MakeNativePeerMethod<decltype(MethodPtr), (MethodPtr)>(name)
- //Register the peer
+ // Register the peer
jni::RegisterNativePeer<RasterLayer>(
env, RasterLayer::javaClass, "nativePtr",
std::make_unique<RasterLayer, JNIEnv&, jni::String, jni::String>,
diff --git a/platform/android/src/style/layers/symbol_layer.cpp b/platform/android/src/style/layers/symbol_layer.cpp
index 9318d42d5b..14803ae278 100644
--- a/platform/android/src/style/layers/symbol_layer.cpp
+++ b/platform/android/src/style/layers/symbol_layer.cpp
@@ -317,12 +317,12 @@ namespace android {
}
void SymbolLayer::registerNative(jni::JNIEnv& env) {
- //Lookup the class
+ // Lookup the class
SymbolLayer::javaClass = *jni::Class<SymbolLayer>::Find(env).NewGlobalRef(env).release();
#define METHOD(MethodPtr, name) jni::MakeNativePeerMethod<decltype(MethodPtr), (MethodPtr)>(name)
- //Register the peer
+ // Register the peer
jni::RegisterNativePeer<SymbolLayer>(
env, SymbolLayer::javaClass, "nativePtr",
std::make_unique<SymbolLayer, JNIEnv&, jni::String, jni::String>,
diff --git a/platform/android/src/style/sources/geojson_source.cpp b/platform/android/src/style/sources/geojson_source.cpp
index 234dccb315..37ce0644c1 100644
--- a/platform/android/src/style/sources/geojson_source.cpp
+++ b/platform/android/src/style/sources/geojson_source.cpp
@@ -27,19 +27,19 @@ namespace android {
void GeoJSONSource::setGeoJSON(jni::JNIEnv& env, jni::Object<> json) {
using namespace mbgl::style::conversion;
- //Convert the jni object
+ // Convert the jni object
Result<GeoJSON> converted = convert<GeoJSON>(Value(env, json));
if(!converted) {
mbgl::Log::Error(mbgl::Event::JNI, "Error setting geo json: " + converted.error().message);
return;
}
- //Update the core source
+ // Update the core source
source.as<mbgl::style::GeoJSONSource>()->GeoJSONSource::setGeoJSON(*converted);
}
void GeoJSONSource::setURL(jni::JNIEnv& env, jni::String url) {
- //Update the core source
+ // Update the core source
source.as<mbgl::style::GeoJSONSource>()->GeoJSONSource::setURL(jni::Make<std::string>(env, url));
}
@@ -51,12 +51,12 @@ namespace android {
}
void GeoJSONSource::registerNative(jni::JNIEnv& env) {
- //Lookup the class
+ // Lookup the class
GeoJSONSource::javaClass = *jni::Class<GeoJSONSource>::Find(env).NewGlobalRef(env).release();
#define METHOD(MethodPtr, name) jni::MakeNativePeerMethod<decltype(MethodPtr), (MethodPtr)>(name)
- //Register the peer
+ // Register the peer
jni::RegisterNativePeer<GeoJSONSource>(
env, GeoJSONSource::javaClass, "nativePtr",
std::make_unique<GeoJSONSource, JNIEnv&, jni::String, jni::Object<>>,
diff --git a/platform/android/src/style/sources/raster_source.cpp b/platform/android/src/style/sources/raster_source.cpp
index b56b56676d..42ac4cda99 100644
--- a/platform/android/src/style/sources/raster_source.cpp
+++ b/platform/android/src/style/sources/raster_source.cpp
@@ -36,12 +36,12 @@ namespace android {
}
void RasterSource::registerNative(jni::JNIEnv& env) {
- //Lookup the class
+ // Lookup the class
RasterSource::javaClass = *jni::Class<RasterSource>::Find(env).NewGlobalRef(env).release();
#define METHOD(MethodPtr, name) jni::MakeNativePeerMethod<decltype(MethodPtr), (MethodPtr)>(name)
- //Register the peer
+ // Register the peer
jni::RegisterNativePeer<RasterSource>(
env, RasterSource::javaClass, "nativePtr",
std::make_unique<RasterSource, JNIEnv&, jni::String, jni::Object<>, jni::jint>,
diff --git a/platform/android/src/style/sources/source.cpp b/platform/android/src/style/sources/source.cpp
index aca7bd6a84..b780de5627 100644
--- a/platform/android/src/style/sources/source.cpp
+++ b/platform/android/src/style/sources/source.cpp
@@ -5,11 +5,11 @@
#include <mbgl/util/logging.hpp>
-//Java -> C++ conversion
+// Java -> C++ conversion
#include <mbgl/style/conversion.hpp>
#include <mbgl/style/conversion/source.hpp>
-//C++ -> Java conversion
+// C++ -> Java conversion
#include "../conversion/property_value.hpp"
#include <string>
@@ -44,15 +44,15 @@ namespace android {
}
void Source::addToMap(mbgl::Map& _map) {
- //Check to see if we own the source first
+ // Check to see if we own the source first
if (!ownedSource) {
throw std::runtime_error("Cannot add source twice");
}
- //Add source to map
+ // Add source to map
_map.addSource(releaseCoreSource());
- //Save pointer to the map
+ // Save pointer to the map
this->map = &_map;
}
@@ -64,17 +64,17 @@ namespace android {
jni::Class<Source> Source::javaClass;
void Source::registerNative(jni::JNIEnv& env) {
- //Lookup the class
+ // Lookup the class
Source::javaClass = *jni::Class<Source>::Find(env).NewGlobalRef(env).release();
#define METHOD(MethodPtr, name) jni::MakeNativePeerMethod<decltype(MethodPtr), (MethodPtr)>(name)
- //Register the peer
+ // Register the peer
jni::RegisterNativePeer<Source>(env, Source::javaClass, "nativePtr",
METHOD(&Source::getId, "nativeGetId")
);
}
-} //android
-} //mbgl \ No newline at end of file
+} // namespace android
+} // namespace mbgl
diff --git a/platform/android/src/style/sources/source.hpp b/platform/android/src/style/sources/source.hpp
index 0e5d354d93..9a9d504d68 100644
--- a/platform/android/src/style/sources/source.hpp
+++ b/platform/android/src/style/sources/source.hpp
@@ -46,22 +46,18 @@ public:
jni::String getId(jni::JNIEnv&);
protected:
- //Release the owned view and return it
+ // Release the owned view and return it
std::unique_ptr<mbgl::style::Source> releaseCoreSource();
- //Set on newly created sources until added to the map
+ // Set on newly created sources until added to the map
std::unique_ptr<mbgl::style::Source> ownedSource;
- //Raw pointer that is valid until the source is removed from the map
+ // Raw pointer that is valid until the source is removed from the map
mbgl::style::Source& source;
- //Map pointer is valid for newly created sources only after adding to the map
+ // Map pointer is valid for newly created sources only after adding to the map
mbgl::Map* map;
};
-} //android
-} //mbgl
-
-
-
-
+} // namespace android
+} // namespace mbgl
diff --git a/platform/android/src/style/sources/sources.cpp b/platform/android/src/style/sources/sources.cpp
index 210acd607f..cae4bb47b2 100644
--- a/platform/android/src/style/sources/sources.cpp
+++ b/platform/android/src/style/sources/sources.cpp
@@ -43,4 +43,4 @@ void registerNativeSources(jni::JNIEnv& env) {
}
}
-} \ No newline at end of file
+}
diff --git a/platform/android/src/style/sources/sources.hpp b/platform/android/src/style/sources/sources.hpp
index 3038873733..09a8b35067 100644
--- a/platform/android/src/style/sources/sources.hpp
+++ b/platform/android/src/style/sources/sources.hpp
@@ -9,12 +9,12 @@
namespace mbgl {
namespace android {
-
+
mbgl::android::Source* initializeSourcePeer(mbgl::Map&, mbgl::style::Source&);
-
+
jni::jobject* createJavaSourcePeer(jni::JNIEnv&, mbgl::Map&, mbgl::style::Source&);
-
+
void registerNativeSources(jni::JNIEnv&);
}
-} \ No newline at end of file
+}
diff --git a/platform/android/src/style/sources/vector_source.cpp b/platform/android/src/style/sources/vector_source.cpp
index 0d065a3348..e60d8d4641 100644
--- a/platform/android/src/style/sources/vector_source.cpp
+++ b/platform/android/src/style/sources/vector_source.cpp
@@ -35,12 +35,12 @@ namespace android {
}
void VectorSource::registerNative(jni::JNIEnv& env) {
- //Lookup the class
+ // Lookup the class
VectorSource::javaClass = *jni::Class<VectorSource>::Find(env).NewGlobalRef(env).release();
#define METHOD(MethodPtr, name) jni::MakeNativePeerMethod<decltype(MethodPtr), (MethodPtr)>(name)
- //Register the peer
+ // Register the peer
jni::RegisterNativePeer<VectorSource>(
env, VectorSource::javaClass, "nativePtr",
std::make_unique<VectorSource, JNIEnv&, jni::String, jni::Object<>>,
diff --git a/platform/android/src/style/value.cpp b/platform/android/src/style/value.cpp
index c8aad1682b..0b5d81feb1 100644
--- a/platform/android/src/style/value.cpp
+++ b/platform/android/src/style/value.cpp
@@ -20,7 +20,7 @@ namespace android {
JNIEnv& env;
};
- //Instance
+ // Instance
Value::Value(jni::JNIEnv& env, jni::jobject* _value) : jenv(env), value(_value, ObjectDeleter(env)) {}
diff --git a/platform/android/src/test/Main.java b/platform/android/src/test/Main.java
index b6f540f666..b0f3aeb7b9 100644
--- a/platform/android/src/test/Main.java
+++ b/platform/android/src/test/Main.java
@@ -3,13 +3,13 @@ public class Main {
public native void runAllTests(String[] args);
public static void main(String[] args) throws Exception {
- //Load the tests
+ // Load the tests
System.loadLibrary("mbgl-test");
- //Run the tests
+ // Run the tests
new Main().runAllTests(args);
- //Exit explicitly otherwise dalvikvm won't quit
+ // Exit explicitly otherwise dalvikvm won't quit
System.exit(0);
}
}
diff --git a/platform/android/src/timer.cpp b/platform/android/src/timer.cpp
index 2eb003b2bd..2d9ee49e9b 100644
--- a/platform/android/src/timer.cpp
+++ b/platform/android/src/timer.cpp
@@ -23,7 +23,7 @@ public:
repeat = repeat_;
task = std::move(task_);
- //Prevent overflows when timeout is set to Duration::max()
+ // Prevent overflows when timeout is set to Duration::max()
due = (timeout == Duration::max()) ? std::chrono::time_point<Clock>::max() : Clock::now() + timeout;
loop->addRunnable(this);
}