summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-27 17:43:37 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-30 23:37:44 +0300
commit62b543e44a5d63dd79dfc7ab68696dc8a3f8e3ef (patch)
tree3e1b27e9cedbc53b43ec952579553618731ab671 /src
parent65f4df5190d764a12a2c8054bfce2838545917e7 (diff)
downloadqtlocation-mapboxgl-62b543e44a5d63dd79dfc7ab68696dc8a3f8e3ef.tar.gz
[core] Fix google-explicit-constructor errors
As reported by clang-tidy-8.
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/annotation/annotation_tile.cpp3
-rw-r--r--src/mbgl/style/expression/compound_expression.cpp2
-rw-r--r--src/mbgl/style/expression/expression.cpp2
3 files changed, 3 insertions, 4 deletions
diff --git a/src/mbgl/annotation/annotation_tile.cpp b/src/mbgl/annotation/annotation_tile.cpp
index 69c9f07655..c74fcfd4a9 100644
--- a/src/mbgl/annotation/annotation_tile.cpp
+++ b/src/mbgl/annotation/annotation_tile.cpp
@@ -70,8 +70,7 @@ const GeometryCollection& AnnotationTileFeature::getGeometries() const {
class AnnotationTileLayerData {
public:
- AnnotationTileLayerData(std::string name_) : name(std::move(name_)) {
- }
+ explicit AnnotationTileLayerData(std::string name_) : name(std::move(name_)) {}
const std::string name;
std::vector<std::shared_ptr<const AnnotationTileFeatureData>> features;
diff --git a/src/mbgl/style/expression/compound_expression.cpp b/src/mbgl/style/expression/compound_expression.cpp
index 31628617f6..b95dabfc84 100644
--- a/src/mbgl/style/expression/compound_expression.cpp
+++ b/src/mbgl/style/expression/compound_expression.cpp
@@ -33,7 +33,7 @@ bool operator==(const VarargsType& lhs, const VarargsType& rhs) {
template <typename T>
struct Varargs : std::vector<T> {
template <class... Args>
- Varargs(Args&&... args) : std::vector<T>(std::forward<Args>(args)...) {}
+ explicit Varargs(Args&&... args) : std::vector<T>(std::forward<Args>(args)...) {}
};
namespace detail {
diff --git a/src/mbgl/style/expression/expression.cpp b/src/mbgl/style/expression/expression.cpp
index 4f5e3848d5..270fa5eba0 100644
--- a/src/mbgl/style/expression/expression.cpp
+++ b/src/mbgl/style/expression/expression.cpp
@@ -12,7 +12,7 @@ public:
const Feature& feature;
mutable optional<GeometryCollection> geometry;
- GeoJSONFeature(const Feature& feature_) : feature(feature_) {}
+ explicit GeoJSONFeature(const Feature& feature_) : feature(feature_) {}
GeoJSONFeature(const Feature& feature_, const CanonicalTileID& canonical) : feature(feature_) {
geometry = convertGeometry(feature.geometry, canonical);
// https://github.com/mapbox/geojson-vt-cpp/issues/44